get file = 'Directory:\Path\offense segment.sav'. *Recode offense codes into Crimes Against Persons, Property, and Society and provide labels recode off_code ('200' = 2) ('13A' = 1) ('13B' = 1) ('13C' = 1) ('510' = 2) ('220' = 2) ('250' = 2) ('290' = 2) ('35A' = 3) ('35B' = 3) ('270' = 2) ('210' = 2) ('26A' = 2) ('26B' = 2) ('26C' = 2) ('26D' = 2) ('26E' = 2) ('39A' = 3) ('39B' = 3) ('39C' = 3) ('39D' = 3) ('09A' = 1) ('09B' = 1) ('09C' = 1) ('100' = 1) ('23A' = 2) ('23B' = 2) ('23C' = 2) ('23D' = 2) ('23E' = 2) ('23F' = 2) ('23G' = 2) ('23H' = 2) ('240' = 2) ('370' = 3) ('40A' = 3) ('40B' = 3) ('120' = 2) ('11A' = 1) ('11B' = 1) ('11C' = 1) ('11D' = 1) ('36A' = 1) ('36B' = 1) ('280' = 2) ('520' = 3) into cri_typ. VARIABLE LABELS cri_typ 'Crime Type Categorization'. value labels cri_typ 1 'Crimes Against Persons' 2 'Crimes Against Property' 3 'Crimes Against Society'. *Recode Location into categories for table RECODE off_loc ('01'=10) ('02'=3) ('03'=2) ('04'=5) ('05'=3) ('06'=10) ('07'=1) ('08'=1) ('09'=4) ('10'=10) ('11'=5) ('12'=1) ('13'=6) ('14'=2) ('15'=10) ('16'=10) ('17'=2) ('18'=7) ('19'=10) ('20'=8) ('21'=2) ('22'=9) ('23'=1) ('24'=1) ('25'=10) INTO loc_cat . VARIABLE LABELS loc_cat 'Location Categories'. value labels loc_cat 1 'Retail Establishments' 2 'Food/Beverage/Lodging Facilities' 3 'Other Commercial/Office Buildings' 4 'Drug Store/Doctors Office/Hospital' 5 'Government/Public Building' 6 'Highway/Roads/Alleys' 7 'Parking Lots/Garages' 8 'Residences' 9 'Schools/Colleges' 10 'Other/Unknown'. EXECUTE . * Now create the table. TABLES /FORMAT BLANK MISSING('.') /FTOTAL $t 'Total' /TABLES (loc_cat + $t ) BY (cri_typ > (STATISTICS) + $t ) /STATISTICS cpct( ( PCT5.1 ) 'Col %':cri_typ ) /title 'Percent Distribution of Offense,'+ ' by Type of Crime'.