* Replicating the FBI's Crime in the United States 2000 * Motor Vehicle Theft Survival Analysis get file = 'Directory:\Path\output from Reading A Multi-Level Data File Into SPSS'. recode off_code ('200' = 200) ('13A' = 130) ('13B' = 171) ('13C' = 172) ('510' = 510) ('220' = 140) ('250' = 250) ('290' = 290) ('35A' = 350) ('35B' = 351) ('270' = 270) ('210' = 210) ('26A' = 260) ('26B' = 261) ('26C' = 262) ('26D' = 263) ('26E' = 264) ('39A' = 390) ('39B' = 391) ('39C' = 392) ('39D' = 393) ('09A' = 90) ('09B' = 198) ('09C' = 199) ('100' = 190) ('23A' = 160) ('23B' = 161) ('23C' = 162) ('23D' = 163) ('23E' = 164) ('23F' = 165) ('23G' = 166) ('23H' = 167) ('240' = 150) ('370' = 370) ('40A' = 400) ('40B' = 401) ('120' = 120) ('11A' = 110) ('11B' = 180) ('11C' = 181) ('11D' = 182) ('36A' = 360) ('36B' = 361) ('280' = 280) ('520' = 520)into offense. value labels offense 200 'Arson' 130 'Aggravated Assault' 171 'Simple Assault' 172 'Intimidation' 510 'Bribery' 140 'Burglary/Breaking and Entering' 250 'Counterfeiting/Forgery' 290 'Destruction/Damage/Vandalism of Property' 350 'Drug/Narcotics Violations' 351 'Drug Equipment Violations' 270 'Embezzlement' 210 'Extortion/Blackmail' 260 'False Pretenses/Swindle/Confidence Game' 261 'Credit Card/Automated Teller Machine Fraud' 262 'Impersonation' 263 'Welfare Fraud' 264 'Wire Fraud' 390 'Betting/Wagering' 391 'Operating/Promoting/Assisting Gambling' 392 'Gambling Equipment Violations' 393 'Sports Tampering' 90 'Murder and Nonnegligent Manslaughter' 198 'Negligent Manslaughter' 199 'Justifiable Homicide' 190 'Kidnaping/Abduction' 160 'Pocket-picking' 161 'Purse-snatching' 162 'Shoplifting' 163 'Theft From Building' 164 'Theft From Coin-Operated Machine or Device' 165 'Theft From Motor Vehicle' 166 'Theft of Motor Vehicle Parts or Accessories' 167 'All Other Larceny' 150 'Motor Vehicle Theft' 370 'Pornography/Obscene Material' 400 'Prostitution' 401 'Assisting or Promoting Prostitution' 120 'Robbery' 110 'Forcible Rape' 180 'Forcible Sodomy' 181 'Sexual Assault With An Object' 182 'Forcible Fondling' 183 'Rape of a Male' 360 'Incest' 361 'Statutory Rape' 280 'Stolen Property Offenses' 520 'Weapon Law Violations'. compute mvt = 0. if (offense = 150)mvt = 1. compute mvt_arr = 0. if (arr_off = '150')mvt_arr = 1. if (tot_aseg ge 1)clr_arr = 1. if (excp_clr = 'A' or excp_clr = 'B' or excp_clr = 'C' or excp_clr = 'D' or excp_clr = 'E')CLR_EXCP = 1. compute off_cnt = 0. compute vic_cnt = 0. compute arr_cnt = 0. compute ofns_cnt = 0. if (ibr_rec = '02')ofns_cnt = 1. if (ibr_rec = '04')vic_cnt = 1. if (ibr_rec = '05')off_cnt = 1. if (ibr_rec = '06')arr_cnt = 1. recode off_loc (' ' = sysmis)(convert) into inc_loc. missing values att_comp (' '). select if (inc_yr = 1999). sort cases by ori inc_num. AGGREGATE /OUTFILE= 'Directory:\Path\MVT Incident 1999.sav' /PRESORTED /BREAK=ori inc_num /inc_yr = FIRST(inc_yr) /inc_mo = FIRST(inc_mo) /inc_dy = FIRST(inc_dy) /inc_hr = FIRST(inc_hr) /rptdate = first(rptdate) /inc_loc 'Incident location' = first(inc_loc) /CLR_EXCP 'Incident was cleared exceptionally' = first(CLR_EXCP) /CLR_ARR 'Incident was cleared by an arrest' = first(CLR_ARR) /ofns_cnt 'Count of offenses in incident' = sum(ofns_cnt) /off_cnt 'Count of offenders in incident' = sum(off_cnt) /vic_cnt 'Count of victims in incident' = sum(vic_cnt) /arr_cnt 'Count of arrests for incident' = sum(arr_cnt) /att_comp 'Completed or attempted' = first(att_comp) /mvt 'Motor vehicle theft offense in incident' = sum(mvt) /mvt_arr 'Count of arrests for motor vehicle theft in incident' = sum(mvt_arr) /mvt_num 'Number of stolen motor vehicles' = sum(mvt_num) /mvt_reco 'Number of recovered stolen motor vehicles' = sum(mvt_reco). GET FILE= 'Directory:\Path\MVT Incident 1999.sav'. Select if ( inc_yr = 1999 and ofns_cnt = 1 and mvt = 1 and mvt_num = 1). freq inc_yr ofns_cnt mvt mvt_num. COMPUTE cleared = 2. IF (clr_arr = 1 OR clr_excp = 1)cleared = 1. IF (SYSMIS(mvt_reco) or mvt_reco = 0)mvt_reco = 2. VALUE LABELS mvt_reco 1 'Recovered' 2 'Not Recovered' / cleared 1 'Cleared' 2 'Not cleared'. SET TLook 'Directory:\Path\MVT TableLooks.tlo' TFit Labels. * Table 5.1 Percent Distribution of Motor Vehicle Theft Incidents by Day of Week. COMPUTE dyofweek = XDATE.WKDAY(DATE.DMY(inc_dy,inc_mo,inc_yr)) . FREQUENCIES VARIABLES=dyofweek /ORDER= ANALYSIS . VARIABLE LABELS dyofweek 'Day'. VALUE LABELS dyofweek 1 'Sunday' 2 'Monday' 3 'Tuesday' 4 'Wednesday' 5 'Thursday' 6 'Friday' 7 'Saturday'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=dyofweek + $t000001 BY (STATISTICS) /STATISTICS cpct( dyofweek( F5.2 ) 'NIBRS') /TITLE 'Percent Distribution of Motor Vehicle Theft Incidents' 'by Day of Week'. * Table 5.2 Percent Distribution of Motor Vehicle Theft Incidents by Month. VALUE LABELS inc_mo 1 'January' 2 'February' 3 'March' 4 'April' 5 'May' 6 'June' 7 'July' 8 'August' 9 'September' 10 'October' 11 'November' 12 'December'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=inc_mo + $t000001 BY (STATISTICS) /STATISTICS cpct( inc_mo( F5.2 ) 'Percent') /TITLE 'Percent Distribution of Motor Vehicle Theft' 'Incidents by Month'. * Table 5.3 Percent Distribution of Motor Vehicle Theft Incidents by Location. RECODE inc_loc (20 = 1) (19 = 2) (13 = 3) (25 = 4) (5 = 5) (3 = 6) (24 = 7) (23 = 8) (14 = 9) (7 = 10) (else = 11)INTO inc_loc2. VALUE LABELS inc_loc2 1 'Residence/Home' 2 'Rental Storage Facility' 3 'Highway/Road/Alley' 4 'Unknown Location' 5 'Commercial Office Building' 6 'Bar/Night Club' 7 'Specialty Store' 8 'Service/Gas Station' 9 'Hotel/Motel' 10 'Convenience Store' 11 'All Others'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=inc_loc2 + $t000001 BY (STATISTICS) /STATISTICS cpct( inc_loc2 ( F5.2 ) 'Percent') /TITLE 'Percent Distribution of Motor Vehicle Theft' 'Incidents by Location'. * Tables 5.4 Recovery of Stolen Motor Vehicles by Day of Week. USE ALL. COMPUTE filter_$=(mvt_reco = 1). VARIABLE LABEL filter_$ 'mvt_reco = 1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total Recovered" /TABLE=dyofweek + $t000001 BY (STATISTICS) /STATISTICS cpct( dyofweek( F5.2 ) 'NIBRS') /TITLE 'Recovery of Stolen Motor Vehicles by Day of Week'. * Table 5.5 Recovery of Stolen Motor Vehicles by Month. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total Recovered" /TABLE=inc_mo + $t000001 BY (STATISTICS) /STATISTICS cpct( inc_mo( F5.2 ) 'Percent') /TITLE 'Recovery of Stolen Motor Vehicles by Month'. * Table 5.6 Percent of Clearances for Motor Vehicle Thefts by Recovery Status. FILTER OFF. USE ALL. TEMPORARY. VARIABLE LABELS mvt_reco '' cleared '' . TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=mvt_reco + $t000001 BY cleared + $t000002 /STATISTICS cpct( cleared( PCT5.1 ) '':mvt_reco ) /TITLE 'Percent of Clearances for Motor Vehilce Theft' 'by Recovery Status'. * Table 5.7 Age, Sex, and Race Composition of Motor Vehicle Theft Arrestees. SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE='Directory:\Path\MVT Incident 1999.sav' /COMPRESSED. GET FILE='Directory:\Path\1999 Arrestee Segment.sav'. SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE='Directory:\Path\1999 Arrestee Segment.sav' /COMPRESSED. MATCH FILES /FILE=* /TABLE='Directory:\Path\MVT Incident 1999.sav' /BY ori inc_num /DROP= arr_clr arr_disp arr_dy arr_mo arr_off arr_res arr_type arr_wpn1 arr_wpn2 arr_yr arroff arrseq atr ibr_rec inc_date msg st_code. SELECT IF (mvt = 1). RECODE arr_age (6 thru 11 = 1) (12 thru 17 = 2) (18 thru 24 = 3) (25 thru 29 = 4) (30 thru 34 = 5) (35 thru 39 = 6) (40 thru 44 = 7) (45 thru 49 = 8) (50 thru 54 = 9) (55 thru 59 = 10) (60 thru 64 = 11) (65 thru 98 = 12) (else = 13)into agegrp. VALUE LABELS agegrp 1 '6-11' 2 '12-17' 3 '18-24' 4 '25-29' 5 '30-34' 6 '35-39' 7 '40-44' 8 '45-49' 9 '50-54' 10 '55-59' 11 '60-64' 12 '65+' 13 'U'. RECODE arr_race ('A' = 4) ('B' = 2) ('W' = 1) ('I' = 3) ('U' = 5)INTO race. VALUE LABELS race 1 'W' 2 'B' 3 'I' 4 'A' 5 'U'. RECODE arr_sex ('F' = 2) ('M' = 1) into sex. VALUE LABELS sex 1 'Male' 2 'Female'. * General Tables. TEMPORARY. VARIABLE LABELS agegrp '' sex '' race '' . TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000002 "Total" $t000001 "Total" /TABLE=agegrp + $t000002 BY (sex > (STATISTICS) > race > (STATISTICS)) + $t000001 /STATISTICS count( agegrp( F5.0 ) '') /TITLE 'Age, Sex, and Race Composition of Motor Vehicle Theft Arrestees'. * Table 5.8 through 5.11 Survival Estimates. GET FILE='Directory:\Path\MVT Incident 1999.sav'. SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE='Directory:\Path\MVT Incident 1999.sav' /COMPRESSED. GET FILE='Directory:\Path\1999 Property Segment.sav'. SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE='Directory:\Path\1999 Property Segment.sav' /COMPRESSED. MATCH FILES /FILE=* /TABLE='Directory:\Path\MVT Incident 1999.sav' /BY ori inc_num /KEEP = ori inc_num mvt inc_yr inc_mo inc_dy p_date. SELECT IF (mvt = 1 and inc_yr = 1999). SAVE OUTFILE = 'Directory:\Path\mvt recovery time.sav'/KEEP = ori inc_num inc_yr inc_mo inc_dy p_date. COMPUTE recov_yr = TRUNC(p_date/10000). COMPUTE recov_mo = TRUNC((MOD(p_date,10000))/100). COMPUTE recov_dy = (MOD(p_date,100)). COMPUTE fleedays = (YRMODA(recov_yr,recov_mo,recov_dy) - YRMODA(inc_yr,inc_mo,inc_dy)). RECODE fleedays (0 thru 1 = 1) (2 thru 6 = 2) (7 thru 20 = 3) (21 thru 50 = 4) (51 thru 140 = 5) (141 thru 320 = 6) (321 thru 680 = 7) (681 thru hi = 8)INTO time. VALUE LABELS time 1 '0-1' 2 '2-6' 3 '7-20' 4 '21-50' 5 '51-140' 6 '141-320' 7 '321-680' 8 'over 680'. COMPUTE dupe = 1. IF (ori = LAG(ori) and inc_num = LAG(inc_num))dupe = LAG(dupe) + 1. SELECT IF (dupe = 1). FREQUENCIES VARIABLES=time /ORDER= ANALYSIS . SAVE OUTFILE = 'Directory:\Path\mvt recovery time.sav'/KEEP = ori inc_num inc_yr inc_mo inc_dy p_date.