*First, create a variable 'assault' to use in the table RECODE off_code ('13A'=1) ('13B'=2) INTO assault . value labels assault 1 'Aggravated Assault' 2 'Simple Assault' . EXECUTE . *Now, run the crosstabs to display the table CROSSTABS /TABLES=weapon1 weapon2 weapon3 BY assault /FORMAT= AVALUE TABLES /CELLS= COUNT . *To display the injury information, two segments - offense and victim- must be sorted and matched SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE = 'Directory:\Path\offense segment.sav'. GET FILE = 'Directory:\Path\victim segment.sav'. SORT CASES BY ori (A) inc_num (A) . SAVE OUTFILE = 'Directory:\Path\victim segment.sav'. GET FILE = 'Directory:\Path\offense segment.sav'. MATCH FILES /FILE=* /FILE='P:\ibrrc\Tables\1999Victim.sav' /RENAME (ibr_rec inc_date msvoff ofnseq1 ofnseq10 ofnseq2 ofnseq3 ofnseq4 ofnseq5 ofnseq6 ofnseq7 ofnseq8 ofnseq9 ovr1 ovr10 ovr2 ovr3 ovr4 ovr5 ovr6 ovr7 ovr8 ovr9 st_code v_age v_ethnic v_off1 v_off10 v_off2 v_off3 v_off4 v_off5 v_off6 v_off7 v_off8 v_off9 v_race v_resid v_type vcircum1 vcircum2 vic_age vic_sex vjusthom voff1 voff10 voff2 voff3 voff4 voff5 voff6 voff7 voff8 voff9 = d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 d42 d43 d44 d45 d46 d47 d48 d49 d50 d51 d52 d53) /BY ori inc_num /DROP= d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 d42 d43 d44 d45 d46 d47 d48 d49 d50 d51 d52 d53. EXECUTE. *Filter out all but the first victim (otherwise we have no offense information) *Since the table would be large if we looked at every weapon type, we'll select out only the ones we're interested in USE ALL. COMPUTE filter_$=(vic_num = 1) & (weapon1 = '40' | weapon1 = '99' | weapon1 = ' '). VARIABLE LABEL filter_$ 'filter = 1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE . *Create the final table CROSSTABS /TABLES=v_inj1 BY weapon1 BY assault /FORMAT= AVALUE TABLES /CELLS= COUNT .