/* Encoding: UTF-8. /*This file includes recodes in SPSS for NCVS data analysis regarding incidents with a weapon. *Please note that all recodes in this file may not be necessary to run your analysis. The recodes you choose will be based on your analysis. *Examples of how these recodes were used for analysis can be found in BJS current reports at bjs.ojp.gov. *For more information about the NCVS, see the BJS website or contact AskBJS at AskBJS@usdoj.gov. **************************************************************************************** /* create variable for use of a weapon (OK version n9*). missing values all(). *Create variable weapon using variables v4529 and v4049. This variable shows whether offender had a weapon or not for violent crimes. *Property crimes in the NCVS by definition do not involve weapons. do if (v4529 ge 24). + compute weapon=77. /* Property Crime. else if (v4529 lt 24). . recode v4049 (1= 1) /* Yes, Offender had a weapon (2= 2) /* No, Offender did not have a weapon (3= 3) /* Do not know if Offender had a weapon (8=88) /* Residue (9=99) /* Out of Universe into weapon. end if. **************************************************************************************** *Create new variable weaptyp using variables: v4049-v4057 *This variable has values that tell you the type of weapon used in the incident. do if (v4529 ge 24). + compute weaptyp=77. /* Property Crime. else if (v4529 lt 24). . if (weapon eq 2) weaptyp=0. /* No weapons. . do if ((weapon eq 1) and (V4051 eq 1)). + compute weaptyp eq 1. /* Handgun. . else if ((weapon eq 1) and (V4052=1)). + compute weaptyp=2. /* Other type gun. . else if ((weapon eq 1) and (V4057 eq 1)). + compute weaptyp=3. /* Gun type unknown. . else if ((weapon eq 1) and (V4053 eq 1)). + compute weaptyp=4. /* Knife. + else if ((weapon eq 1) and (V4054 eq 1)). + compute weaptyp=5. /* Sharp object. . else if ((weapon eq 1) and (V4055 eq 1)). + compute weaptyp=6. /* Blunt object. . else if ((weapon eq 1) and (V4056 eq 1)). + compute weaptyp=7. /* Other type weapon. . else if ((weapon eq 1) and ((v4050 eq 7) and (v4058 eq 8))). + compute weaptyp=8. /* Type weapon unknown. + else if ((weapon eq 1) and ((v4050 eq 3) and (v4058 eq 8))). + compute weaptyp=8. /* Type weapon unknown. . else if (v4049 eq 3). + compute weaptyp=9. /* Do Not Know if offender had weapon. . end if. end if. *Create new variable weapcat using newly created variable weaptyp. *This variable collapses the weapon categories from weaptyp that allows you to filter for no weapon used. recode weaptyp (0 = 0) /* No Weapon (1,2,3= 1) /* Firearm (4,5 = 2) /* Knife or sharp object (6,7 = 3) /* Other type weapon (8 = 4) /* Type weapon unknown (9 = 5) /* Do Not Know if offender had weapon (77 =77) /* Property Crime into weapcat. **************************************************************************************** *Add variable and value labels to newly created variables. variable labels weapon 'Offender had weapon?' weaptyp 'Type of weapon used' weapcat 'Category of weapon used'. value labels weapon 1 'yes' 2 'no' 3 'Do Not Know if Offender Had Weapon' 77 'Property Crime' 88 'Residue' 99 'Out of Universe'/ weaptyp 0 'No weapon' 1 'Handgun' 2 'Other Gun' 3 'Gun Type Unknown' 4 'Knife' 5 'Sharp Object' 6 'Blunt Object' 7 'Other Type Weapon' 8 'Type Weapon Unknown' 9 'Do Not Know if Offender Had Weapon' 77 'Property Crime'/ weapcat 0 'No Weapon' 1 'Firearm' 2 'Knife' 3 'Other Type Weapon' 4 'Type Weapon Unknown' 5 'Do Not Know if Offender Had Weapon' 77 'Property Crime'/. execute.