Research Question 1: Are juveniles aged 10 - 17 more likely than adults to be involved in multiple offender incidents?

Click here to download SPSS code

The following code creates the variables necessary to answer the research question and creates a table.  When using this code, be sure to insert the path and the file name of the data file to be used, as well as the name of the file to be saved.  If you need any assistance working with the syntax provided, please contact us.

The assumptions for the following example of code are:

  1. The data file was created as described in "Reading A Multi-Level Data File Into SPSS";
  2. An aggregated flat file was created as described in "Creating An Incident-Level Aggregated Flat File";
  3. The individual data segments were saved in separate files as described in "Preparing Individual File Segments For Detailed Analysis"; and
  4. All examples are at the incident unit of analysis.


Defining the Variables

This first section of programming creates new variables to answer the research question.  The new variables are needed for identifying the offender composition (single, multiple) of incidents, the age categories (adult, juvenile) of the offenders, and the types of offenses committed.

GET FILE = 'Directory:\Path\Incident-level flat file.sav'.

COMPUTE type_inc = 0.
IF (off_cnt = 1)type_inc = 1.
IF (off_cnt gt 1)type_inc = 2.

  1 'Single Offender'
  2 'Multiple Offenders'.

MISSING VALUES type_inc (0).

This COMPUTE creates a grouping variable called INDEX from the most serious offense in the incident variable.  The most serious offense in the incident variable was derived from the victim offense(s) in the "Creating" step when the AGGREGATE command was executed.  In the RECODE, INDEX is assigned a numeric value from 1 to 7, corresponding to the FBI Part I Index offenses.  In this example, arson is not included as a Part I Index offense.  Non-index offenses are set to value '8'.   The second RECODE groups the recoded index values into the variable MSOFFGP.   The most serious offense group values are person, property, and other.  Value labels are also assigned.

COMPUTE index = msioff.
RECODE index (90 = 1)(110 = 2)(120 = 3)
  (130 = 4)(140 = 5)(160 thru 167 = 6)(150 = 7)
  (else = 8).
VALUE LABELS index 1 'Murder and Nonnegligent Manslaughter'
  2 'Forcible Rape'  3 'Robbery'  4 'Aggravated Assault'  5 'Burglary'
  6 'Larceny'  7 'Motor Vehicle Theft'  8 'All Other Offenses'.
RECODE index (1 thru 4 = 1)(5 thru 7 =2)(else = 3)into msoffgp.
VALUE LABELS msoffgp 1 'Person Offenses'  2 'Property Offenses'
  3 'Other Offenses'.

These IF statements create a new variable to capture whether the incident was an adult-only incident or one that included at least one juvenile.  Whereas an adult incident is composed only of adults, a juvenile incident can include one or more adults but must have at least one juvenile offender aged 10 to 17.  Variable and value labels are assigned.

IF (offadult ge 1 and off1017 = 0)juv_off = 0.
IF (off1017 ge 1)juv_off = 1.
VARIABLE LABELS juv_off  'Incident involved a juvenile offender'.
VALUE LABELS juv_off  1 'Juvenile offender(s)'  0 'Adult offender(s)'.

Producing the Output

The TEMPORARY and VARIABLE LABELS statements nullify the variable labels to conserve space in the table.  The next set of statements define the table layout, the statistics (count and percent) to be reported, and the title of the table.

  VARIABLE LABELS type_inc "juv_off".
  /format blank missing(".")
  /ftotal=$t000001 "Total" $t000002 "Total"
  /table=type_inc + $t000001 by juv_off + $t000002
  count( type_inc( F5.0 ))
  cpct( type_inc( PCT5.1 ) 'Percent':juv_off )
  /title 'Incident Offender' + 'Composition by Age Group of Offender'.

This output produces the following table:

SAVE OUTFILE ='Directory:\Path\Incident-level flat file.sav'.