*First we need to create a file of only victims reported as stepparents IF (ovr1 = 'SP' | ovr2 = 'SP' | ovr3 = 'SP' | ovr4 = 'SP' | ovr5 = 'SP' | ovr6 = 'SP' | ovr7 = 'SP' | ovr8 = 'SP' | ovr9 = 'SP' | ovr10 = 'SP') stp = 1 . EXECUTE . FILTER OFF. USE ALL. SELECT IF(stp = 1). EXECUTE . COMPUTE master = 1 . EXECUTE . save outfile='Directory:\Path\stepparents as victims.sav'. *Now we need to match the victim information with the offender information MATCH FILES /FILE=* /FILE='Directory:\Path\Offender Data.sav' /RENAME (ibr_rec inc_date st_code = d0 d1 d2) /BY ori inc_num /DROP= d0 d1 d2. EXECUTE. FILTER OFF. USE ALL. SELECT IF(master = 1). EXECUTE . * Since we are only matching the first victim with the first offender, get rid of unmatched victims FILTER OFF. USE ALL. SELECT IF(ofnseq >= 1). EXECUTE . * Now we can create a variable displaying the age difference between victims and offenders COMPUTE age_diff = v_age - off_age . EXECUTE . * Create a variable to indicate victims younger than offenders and create the table RECODE age_diff (-100 thru -1=1) INTO vic_yung . EXECUTE . FREQUENCIES VARIABLES=vic_yung /ORDER= ANALYSIS . * To look at victims and offenders within 8 years of each other, create a variable showing the victims who fall into this range SORT CASES BY age_diff (A) . RECODE age_diff (-8 thru 8=1) INTO sim_age . EXECUTE . * Select only victims and offenders with known ages and create the table USE ALL. COMPUTE filter_$=(v_age > 0 & off_age > 0). VARIABLE LABEL filter_$ 'v_age > 0 & off_age > 0 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE . FREQUENCIES VARIABLES=sim_age /ORDER= ANALYSIS . * To see how many of the stepparent victims who are younger than the offenders compare in age, select younger victims USE ALL. COMPUTE filter_$=(vic_yung = 1). VARIABLE LABEL filter_$ 'vic_yung = 1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE . * Then create the table FREQUENCIES VARIABLES=sim_age /ORDER= ANALYSIS .