Research Question 3: At what time of day are most juvenile multiple offender property offenses committed?
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. NOTE: If you ran the syntax for Research Question 1 or 2 and saved the data file, you need only run the syntax to produce the output; the variables have already been created.
The assumptions for the following example of code are:
|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.
VALUE LABELS type_inc
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 followed by the SELECT IF chooses records if the offense group is 2 (property crime) and incident hour is greater than zero (military time). The GRAPH command defines the chart layout. A review of the data shows a spike at hour zero (midnight). This might indicate that agencies are using zero to report missing data for time of incident.
SELECT IF (msoffgp = 2 and inc_hr gt 0).
/line(simple)=pct by inc_hr
/title 'Peak Time of Day for Juvenile Multiple Offender'
'Property Offense Incidents'.
|This output produces the following graph:|
SAVE OUTFILE ='Directory:\Path\Incident-level flat file.sav'.