Learning Guide
National Crime Victimization Survey

SPSS Syntax

Overview

This example will show how to calculate victimization rates for property and violent crime. SPSS syntax statements are presented in the shaded text boxes. Complete, uninterrupted syntax is provided following the step-by-step instructions.

The difficulties in calculating rates are knowing which numbers to use, which files to take them from, and what adjustments need to be made. The four overall steps are:

  1. Use the incidents data to find both the number of property and the number of violent victimizations, the numerators.
  2. Use the households data to find the number of households at risk, which will be the denominator for property crimes.
  3. Use the persons data to find the number of persons age 12 and older at risk, which will be the denominator for violent crimes.
  4. Calculate each rate, dividing the numerators by the denominators and multiplying by 1,000.

Before beginning the exercise below, see Data Files and Variables for instructions on downloading and renaming the data files. This exercise is written using the following folder and filenames:

ICPSR_36448\DS0002\households2015.sav
ICPSR_36448\DS0003\persons2015.sav
ICPSR_36448\DS0004\incidents2015.sav

If you use different filenames or a different folder structure, you will need to modify the get file commands accordingly.

Steps

Step 1: Find the number of property victimizations and violent victimizations, the numerators.

1a: Access the incident-level data file.

First, change the working directory in SPSS, to avoid having to specify the base directory name in every new get file command. Edit this command to point to the folder where your files are located. (SPSS will remember the folder specified by cd until you exit the program).

Then load the incidents data file. You will use this to calculate the number of violent and property victimizations.

Note: For help finding the path of your data file, right click on the file, select Properties, and see Location.

cd "C:\Path\To\Downloads\ICPSR_36448".
get file = "DS0004\incidents2015.sav".

1b: Exclude crimes occurring outside the United States.

The victimization rates published by the Bureau of Justice Statistics only include incidents taking place inside the United States. Because some respondents report incidents that occurred in other countries, you will need to take this into account.

Use V4022 to restrict the data to crimes that did not occur outside the U.S.

select if (V4022 ne 1).

1c: Create variables that capture the total number of property and violent victimizations.

Codes to identify the specific types of crime are contained in V4529. NCVS codes for violent crimes range from 1 to 20, and codes for property crimes range from 31 to 59.

Use value ranges of V4529 to create new variables indicating violent and property crimes.

recode V4529 (1 thru 20 = 1)(else = 0) into VIOLENT.
recode V4529 (31 thru 59 = 1)(else = 0) into PROPERTY.

1d: Find the weighted numbers of victimizations.

Apply the victimization weight to the data, then run a frequency report on your violent crime and property crime variables to receive estimates for the U.S. population.

Make a note of these numbers, as they will be your numerators for the final rate calculations. You should find 5,006,615 violent victimizations and 14,611,043 property victimizations.*

weight by SERIES_WEIGHT.
freq VIOLENT PROPERTY.

Step 2: Find the number of persons at risk.

You now have the numerators for calculating the rates, and the denominators will be easier. You will find the correct number of persons aged 12 and older (for violent victimizations) and households (for property victimizations), starting with persons.

2a: Access the person-level data file.

Load the persons data file. (Remember to edit this command if you are using a different folder or file name.)

get file = "DS0003\persons2015.sav".

2b: Find the weighted number of persons.

Weight the data using the included variable WGTPERCY, then run a frequency report to find the total number of persons in the population: 269,526,471.

weight by WGTPERCY.
freq V3001.

Step 3: Find the number of households at risk.

Finding the denominator for households is the same straightforward process as Step 2 for persons.

3a: Access the household-level data file.

Load the households data file. (Remember to edit this command if you are using a different folder or file name.)

get file = "DS0002\households2015.sav".

3b: Find the weighted number of households.

Weight the data using the included variable WGTHHCY, then run a frequency report to find the total number of households in the population: 131,962,257.

weight by WGTHHCY.
freq V2001.

Step 4: Calculate the violent and property victimization rates.

You'll have to do this part by hand. Use a calculator to compute the rates. The rate of violent victimization per 1,000 persons is:

5,006,615 � 269,526,471 � 1,000 = 18.6 violent victimizations per 1,000

The rate of property victimization per 1,000 households is:

14,611,043 � 131,962,257 � 1,000 = 110.7 property victimizations per 1,000

Congratulations! You have replicated the official statistics published in Criminal Victimization, 2015.

Complete Syntax

Here is the SPSS syntax without all the detailed comments. You can copy, paste, and run these commands. You will need to edit the "cd" or the "get file" commands to specify the exact location of your data files.

* !! Edit this change directory command to include the path to your saved data. 
setwd("C:/Path/To/Downloads/ICPSR_36142".)

* Step 1a: Access the incident-level data file.
get file = "DS0004\incidents2014.sav". 

* Step 1b: Exclude crimes occurring outside the United States.
select if (V4022 ne 1).

* Step 1c: Create variables that capture the total number of property and violent victimizations.
recode V4529 (1 thru 20 = 1)(else = 0) into VIOLENT.
recode V4529 (31 thru 59 = 1)(else = 0) into PROPERTY.

* Step 1d: Find the weighted numbers of victimizations.
weight by WGTVICCY_REC.
freq VIOLENT PROPERTY.

* Step 2a: Access the person-level data file.
get file = "DS0003\persons2014.sav".

* Step 2b: Find the weighted number of persons.
weight by WGTPERCY.
freq V3001.

* Step 3a: Access the household-level data file.
get file = "DS0002\households2014.sav".

* Step 3b: Find the weighted number of households.
weight by WGTHHCY.
freq V2001.
							

*Note: Because BJS rounds to the nearest 10, the numbers you will find in this exercise are slightly different from the numbers in the Criminal Victimization, 2015 report.