*SPSS Download Code *Multiple Segment Analysis * *Older Adult Vicimization Research Question: * *1. Does the offender age differ by victim-offender relationship for older *adult and younger victims of robbery? *******************************************************************************. GET FILE = 'Directory:\Path\victim segment.sav'. DO REPEAT voff = voff1 to voff10. IF (voff = 120)robbery = 1. END REPEAT. FREQUENCY robbery. TEMPORARY. SELECT IF (robbery = 1 and v_type = 'I'). SAVE OUTFILE = 'Directory:\Path\Robvic96.sav'. GET FILE = 'Directory:\Path\Robvic96.sav'. SORT CASES BY ori inc_num vic_num. DO IF (ofnseq1 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq1.sav' /DROP = ofnseq2 to ofnseq10 ovr2 to ovr10 /RENAME = (ofnseq1 ovr1 =ofnseq ovr). END IF. DO IF (ofnseq2 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq2.sav' /DROP = ofnseq1 ofnseq3 to ofnseq10 ovr1 ovr3 to ovr10 /RENAME = (ofnseq2 ovr2 =ofnseq ovr). END IF. DO IF (ofnseq3 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq3.sav' /DROP = ofnseq1 ofnseq2 ofnseq4 to ofnseq10 ovr1 ovr2 ovr4 to ovr10 /RENAME = (ofnseq3 ovr3 =ofnseq ovr). END IF. DO IF (ofnseq4 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq4.sav' /DROP = ofnseq1 to ofnseq3 ofnseq5 to ofnseq10 ovr1 to ovr3 ovr5 to ovr10 /RENAME = (ofnseq4 ovr4 =ofnseq ovr). END IF. DO IF (ofnseq5 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq5.sav' /DROP = ofnseq1 to ofnseq4 ofnseq6 to ofnseq10 ovr1 to ovr4 ovr6 to ovr10 /RENAME = (ofnseq5 ovr5 =ofnseq ovr). END IF. DO IF (ofnseq6 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq6.sav' /DROP = ofnseq1 to ofnseq5 ofnseq7 to ofnseq10 ovr1 to ovr5 ovr7 to ovr10 /RENAME = (ofnseq6 ovr6 =ofnseq ovr). END IF. DO IF (ofnseq7 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq7.sav' /DROP = ofnseq1 to ofnseq6 ofnseq8 to ofnseq10 ovr1 to ovr6 ovr8 to ovr10 /RENAME = (ofnseq7 ovr7 =ofnseq ovr). END IF. DO IF (ofnseq8 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq8.sav' /DROP = ofnseq1 to ofnseq7 ofnseq9 to ofnseq10 ovr1 to ovr7 ovr9 to ovr10 /RENAME = (ofnseq8 ovr8 = ofnseq ovr). END IF. DO IF (ofnseq9 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq9.sav' /DROP = ofnseq10 ofnseq1 to ofnseq8 ovr10 ovr1 to ovr8 /RENAME = (ofnseq9 ovr9 =ofnseq ovr). END IF. DO IF (ofnseq10 gt 0). XSAVE OUTFILE = 'Directory:\Path\ofnseq10.sav' /DROP = ofnseq1 to ofnseq9 ovr1 to ovr9 /RENAME = (ofnseq10 ovr10 =ofnseq ovr). END IF. EXECUTE. ADD FILES /FILE= 'Directory:\Path\ofnseq1.sav' /FILE= 'Directory:\Path\ofnseq2.sav' /FILE= 'Directory:\Path\ofnseq3.sav' /FILE= 'Directory:\Path\ofnseq4.sav' /FILE= 'Directory:\Path\ofnseq5.sav' /FILE= 'Directory:\Path\ofnseq6.sav' /FILE= 'Directory:\Path\ofnseq7.sav' /FILE= 'Directory:\Path\ofnseq8.sav' /FILE= 'Directory:\Path\ofnseq9.sav' /FILE= 'Directory:\Path\ofnseq10.sav'. SORT cases by ori inc_num ofnseq vic_num. SAVE OUTFILE = 'Directory:\Path\vofnseq.sav'. MATCH FILES /FILE=* /TABLE = 'Directory:\Path\offender segment.sav' /BY ori inc_num ofnseq. RECODE OVR ('SE','CS','PA','SB','CH','GP', 'GC','IL','SP','SC','SS','OF','XS','VO' = 1) ('AQ','FR','NE','BE','BG','CF','HR','XS','EE','ER','OK' = 2) ('RU' = 4)('ST' = 3) (' ' = -1)INTO OVR_RCD. DO IF ((msvoff gt 130 and msvoff lt 171) or msvoff gt 199). RECODE ovr_rcd (-1 = 9). END IF. MISSING VALUES ovr_rcd (-1,9). VALUE LABELS ovr_rcd 1 'Familial' 2 'Known to Victim' 3 'Stranger' 4 'Relationship Unknown' -1 'Missing Relationship Information' 9 'Not Applicable'. VARIABLE LABELS ovr_rcd 'VICTIM TO OFFENDER RELATIONSHIP RECODED'. RECODE v_age (0 thru 64 = 2)(65 thru 95 = 1)into vage65. VALUE LABELS vage65 1 'Age 65 or Older' 2 'Age 64 or Younger'. VARIABLE LABELS vage65 'Victim Age Group'. SAVE OUTFILE = 'Directory:\Path\robbery.sav'. GET FILE = 'Directory:\Path\robbery.sav'. VARIABLE LABELS ovr_rcd 'Victim-Offender Relationship'/ off_age 'Offender Age'. TEMPORARY. SELECT IF (off_age ge 10 and vage65 ge 0). TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= off_age /GBASE=CASES /TABLE=ovr_rcd BY vage65 > off_age /TITLE 'Average Age of Offenders by Relationship With Victims of Robbery' /STATISTICS mean( off_age (f7.1) '' ).