*********************************************************************************; * *; * Program Name: C:\JRSA\ELD_RELATIONSHIP.SAS *; * *; * SAS Download Code *; * *; * Purpose: Older Adult Victimization Research Question: *; * *; * 1. Does the offender age differ by victim-offender relationship for older *; * adult and younger victims of robbery? *; * *; *; *********************************************************************************; LIBNAME PERM 'C:\JRSA\DATA\'; OPTIONS LINESIZE=80 FIRSTOBS=1 OBS=MAX NOFMTERR compress=yes; %LET LINESZ = 120; PROC FORMAT; INVALUE OFF '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 ; VALUE 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' ; RUN; DATA ROBBERY(DROP=I); SET PERM.VICTIM_SEGMENT; ARRAY VOFF{10} VOFF1-VOFF10; DO I=1 TO 10; IF VOFF{I} EQ 120 THEN ROBBERY = 1; OUTPUT; END; RUN; PROC FREQ DATA=ROBBERY; TITLE1 'Total Robberies'; TABLE ROBBERY / LIST; RUN; DATA PERM.ROBVIC96; SET ROBBERY; IF (ROBBERY=1 & V_TYPE = 'I'); RUN; PROC SORT DATA=PERM.ROBVIC96; BY ORI INC_NUM VIC_NUM; RUN; DATA PERM.OFNSEQ(DROP=I); SET PERM.ROBVIC96; BY ORI INC_NUM VIC_NUM; ARRAY LOFNSEQ{10} OFNSEQ1-OFNSEQ10; ARRAY LOVR{10} $ OVR1-OVR10; LENGTH OFNSEQ 4. OVR $2.; IF OFNSEQ1 GT 0; DO I=1 TO 10; OFNSEQ = LOFNSEQ{I}; OVR = LOVR{I}; OUTPUT; END; RUN; PROC SORT DATA=PERM.OFNSEQ OUT=PERM.VOFNSEQ; BY ORI INC_NUM OFNSEQ VIC_NUM; RUN; PROC SORT DATA=PERM.OFFENDER_SEGMENT OUT=OFFENDER_SEGMENT; BY ORI INC_NUM OFNSEQ; RUN; DATA PERM.ROBBERY; MERGE PERM.VOFNSEQ(IN=IN1) OFFENDER_SEGMENT(IN=IN2); BY ORI INC_NUM OFNSEQ; LABEL OVR_RCD = 'Victim-Offender Relationship' VAGE65 = 'Victim Age Group' OFF_AGE = 'Offender Age'; IF IN1 & IN2; IF OVR IN('SE','CS','PA','SB','CH','GP','GC','IL','SP','SC','SS','OF','XS','VO') THEN OVR_RCD = 1; ELSE IF OVR IN('AQ','FR','NE','BE','BG','CF','HR','XS','EE','ER','OK') THEN OVR_RCD= 2; ELSE IF OVR IN('RU') THEN OVR_RCD = 4; ELSE IF OVR IN('ST') THEN OVR_RCD = 3; ELSE IF OVR IN(' ') THEN OVR_RCD = -1; IF ((130 LT MSVOFF GT 171) OR MSVOFF GT 199) THEN DO; OVR_RCD = -1; END; IF (0 LE V_AGE LE 64) THEN VAGE65 = 2; ELSE IF (65 LE V_AGE LE 95) THEN VAGE65 = 1; RUN; PROC FORMAT; VALUE OVR_RCD 1 = 'Familial' 2 = 'Known to Victim' 3 = 'Stranger' 4 = 'Relationship Unknown' -1 = 'Missing Relationship Information' 9 = 'Not Applicable' ; VALUE VAGE 1 = 'Age 65 or Older' 2 = 'Age 64 or Younger' ; RUN; PROC FREQ DATA=PERM.ROBBERY; TITLE 'Average Age of Offenders by Relationship With Victims of Robbery'; TABLES off_age OVR_RCD; WHERE (OFF_AGE GE 10) AND (VAGE65 GE 0); FORMAT OVR_RCD OVR_RCD.; RUN; PROC SORT DATA=PERM.ROBBERY; BY VAGE65; RUN; PROC FREQ DATA=PERM.ROBBERY; TITLE 'Average Age of Offenders by Relationship With Victims of Robbery'; TABLES off_age OVR_RCD; WHERE (OFF_AGE GE 10) AND (VAGE65 GE 0); FORMAT OVR_RCD OVR_RCD. VAGE65 VAGE. ; BY VAGE65; RUN;