summaryrefslogtreecommitdiffstats
path: root/R Scripts/arrest-vs-infection-times.R
diff options
context:
space:
mode:
authorBen Green <bgreen@g.harvard.edu>2015-10-04 17:18:05 -0400
committerBen Green <bgreen@g.harvard.edu>2015-10-04 17:18:05 -0400
commit75868035a6e363c2ad67ff0342440aff3972a970 (patch)
tree5bf65d9f3d5fa47dda8c1695ce34aa24e0f811dd /R Scripts/arrest-vs-infection-times.R
parent3969a594c49e58aafe04ff352b02d0d61eb228cf (diff)
downloadcriminal_cascades-75868035a6e363c2ad67ff0342440aff3972a970.tar.gz
..
Diffstat (limited to 'R Scripts/arrest-vs-infection-times.R')
-rw-r--r--R Scripts/arrest-vs-infection-times.R8
1 files changed, 5 insertions, 3 deletions
diff --git a/R Scripts/arrest-vs-infection-times.R b/R Scripts/arrest-vs-infection-times.R
index 7c0bfcf..4d2a81d 100644
--- a/R Scripts/arrest-vs-infection-times.R
+++ b/R Scripts/arrest-vs-infection-times.R
@@ -19,11 +19,13 @@ first_arrests = as.numeric(arr$date2) - offset
lag = first_vics - first_arrests
hist(lag,100,col='')
h = hist(lag,150,col='#1f78b4',border=NA,axes=T,
- xlab='',ylab='Frequency',main=NULL)
+ xlab='Days between first arrest and first gunshot victimization',
+ ylab='Frequency',main=NULL,cex.axis=0.6,cex.lab=0.6)
box(lwd=1.1)
-
-
+dobs = as.Date(arr$birth_date,format='%m/%d/%Y')
+ages = as.numeric(start_date + first_vics - dobs)
+plot(table(round(ages/365)))