APPLIED DATA ANALYSIS IN CRIMINAL JUSTICE - PowerPoint PPT Presentation

About This Presentation
Title:

APPLIED DATA ANALYSIS IN CRIMINAL JUSTICE

Description:

We will recode to get a variable indicating if a state carried out an execution from 1977-1998. ... Variable label: Category Recode of Executions 1977-1998 ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 98
Provided by: justin170
Category:

less

Transcript and Presenter's Notes

Title: APPLIED DATA ANALYSIS IN CRIMINAL JUSTICE


1
APPLIED DATA ANALYSIS IN CRIMINAL JUSTICE
  • CJ 525
  • MONMOUTH UNIVERSITY
  • Juan P. Rodriguez

2
Lecture 4
  • Constructing Variables

3
Perspective
  • Research Techniques
  • Accessing, Examining and Saving Data
  • Univariate Analysis Descriptive Statistics
  • Constructing (Manipulating) Variables
  • Association Multivariate Analysis
  • Comparing Group Means Bivariate
  • Multivariate Analysis - Regression

4
Constructing Variables
  • Why Construct New Variables?
  • Recoding Existing Variables
  • Computing New Variables
  • Computations Using Syntax
  • Constructing Indices with Syntax

5
Why Construct New Variables?
  • SS researchers obtain data from many sources
    police, hospitals, schools, etc
  • The data may not be in the way needed by the
    researcher
  • Researcher needs to manipulate the data to recode
    existing variables or create new ones more suited
    to his/her needs

6
Constructing Variables
  • Why Construct New Variables?
  • Recoding Existing Variables
  • Computing New Variables
  • Computations Using Syntax
  • Constructing Indices with Syntax

7
Recoding Existing Variables
  • Researchers often want to reconfigure variables
  • Existing variables do not measure the concept of
    interest
  • Alcohol intake is measured by how many drinks
  • Cultural classification is abstainers (0), social
    drinkers (1-2) and alcoholics (3)
  • This needs recoding of a numerical variable into
    a categorical variable

8
Recoding Existing Variables
  • Class Example
  • PRC72 in States dataset is the number of
    prisoners executed from 1977-1998. This is a
    numerical variable
  • We will recode to get a variable indicating if a
    state carried out an execution from 1977-1998.
    This is a categorical variable

9
Recoding Existing Variables
10
Recoding Existing Variables
11
Recoding Existing Variables
12
Recoding Existing Variables
13
Recoding Existing Variables
14
Recoding Existing Variables
15
Recoding Existing Variables
16
Recoding Existing Variables
17
Recoding Existing Variables
18
Recoding Existing Variables
19
Recoding Existing Variables
20
Recoding Existing Variables
  • Track the construction of recoded variables
  • The values 0 and 1 can be labeled No and Yes in
    the Variable view as we learned in last class

21
Recoding Existing Variables
22
Recoding Existing Variables
23
Recoding Existing Variables
  • The frequencies command can be used to examine
    the distribution of executions
  • Analyze
  • Descriptive Statistics
  • Frequencies

24
Recoding Existing Variables
25
Recoding Existing Variables
26
Recoding Existing Variables
27
Setting values to missing
  • A value coded as missing in the original variable
    is not automatically coded as missing in the new
    variable it will be coded in the range assigned.
  • Always ensure that System or User Missing values
    in the old variable are coded as System Missing
    in the new variable.
  • Sometimes we want to set actual values to
    missing
  • In the executions data, Texas had more executions
    than all other states.
  • Because Texas is an outlier, some analyses may be
    more reliable if its values are separated and
    treated as a unique case.

28
Setting values to missing
  • Transform
  • Recode
  • Into Different Values
  • Input Variable PRC72
  • Output Variable Name EXECUT2
  • Output Variable label Category Recode of
    Executions 1977-1998
  • Change

29
Setting values to missing
  • Old and New Values
  • Old Value Value 0
  • New Value Value 0
  • Add
  • Old Value Value 1 through 60
  • New Value Value 1
  • Add
  • Old Value Value 164
  • New Value System Missing
  • Add
  • Continue
  • OK

30
Constructing Variables
  • Why Construct New Variables?
  • Recoding Existing Variables
  • Computing New Variables
  • Computations Using Syntax
  • Constructing Indices with Syntax

31
Computing New Variables
  • Using mathematical functions on one or more
    existing variables to create others
  • We will use the Sort and the Case Summary
    functions on CRC344 (Rapes 1998)
  • Use the Sort and the Case Summaries functions
    learned in last class

32
Computing New Variables
33
Computing New Variables
34
Computing New Variables
35
Computing New Variables
36
Computing New Variables
37
Computing New Variables
  • More rapes occurred in California (9782) than in
    Oklahoma (1513)
  • This does not answer question of where violent
    crime is most problematic population not
    considered
  • Needed Measured number of rapes in reference to
    the potential number of occurrences a RATE

38
Computing New Variables
  • RAPE RATE
  • How many rapes occur for every 100,000 people
  • States data set includes incidence and rate
  • Lets look at CRC347 (Rape Rate in 1998)

39
Computing New Variables
40
Computing New Variables
41
Computing New Variables
42
Computing New Variables
43
Computing New Variables
44
Computing New Variables
  • CRC347 shows that, in relation to its population,
    California has a lower rate of rape than Oklahoma
    (29.9 vs. 45.2 per 100,000 people)

45
Computing New Variables
  • Question
  • Where should LEAs focus financial resources to
    control violent crime (murders, bombings, rapes,
    etc.)?
  • Calculate how much each of the types of crime
    contributes to the total number of violent crimes
  • We need to compute these variables

46
Computing New Variables
  • of violent crimes that are rapes
  • Number of rapes (CRC344) / Number of Violent
    Crimes (CRC315) x 100
  • Well use the Compute command to calculate
    variable RAPEPCT, Rapes as of Violent Crimes
    1998

47
  • Transform
  • Compute
  • Target Variable RAPECT
  • Numeric Expression (CRC344/CRC315)100
  • TypeLabel
  • Label rape as of Violent Crimes in 1998
  • Continue
  • OK

48
Computing New Variables
49
Computing New Variables
50
Computing New Variables
51
Computing New Variables
52
Computing New Variables
53
Computing New Variables
54
Checking the new Variable
  • Use Univariate Analysis to check that data in
    variable is OK
  • Positive code cleaning
  • Use Frequencies or Descriptives to ensure no
    value is lower than 0 or higher than 100

55
Checking the New Variable
56
Checking the New Variable
57
Checking the New Variable
58
Checking the new Variable
  • Use Univariate Analysis to check that data in
    variable is OK
  • Positive code cleaning
  • Use Frequencies or Descriptives to ensure no
    value is lower than 0 or higher than 100
  • Contingency Cleaning
  • Comparing the Constructed Variable to other
    existing Variables Rapes are a violent crime
    that is likely prevalent in states where other
    violent crimes are prevalent

59
Checking the new Variable
60
Checking the new Variable
61
Checking the new Variable
62
Checking the New Variable
  • Looking at the Case Summaries output, the
    calculations seem to be correct
  • In ND rapes are 37 of the violent crimes whereas
    in DC they are only 2

63
Computing New Variables
  • Another reason for Computing New Variables
  • Examining the difference between 2 groups for the
    same attribute
  • How has the teenage birth rate changed from 1980
    to 1990 among the states?
  • Well create a new variable, TEENCH
  • TEENCH BIH38 BIH41
  • Well use the Compute command for this

64
Computing New Variables
  • Transform
  • Compute
  • Target Variable TEENCH
  • Numeric Expression BIH38 BIH41
  • TypeLabel
  • Label Change in Teen Birth Rate 1990-1980
  • Continue
  • OK

65
Computing TEENCH
66
Computing TEENCH
67
Computing TEENCH
68
Computing TEENCH
69
Computing TEENCH
70
Computing TEENCH
71
Checking TEENCH
  • Descriptive Statistics
  • Histogram

72
Checking TEENCH
73
Checking TEENCH
74
Checking TEENCH
75
Checking TEENCH
76
Checking TEENCH
77
Using Syntax
  • Creating and Using new variables require record
    keeping and data management
  • SPSS permits pasting of procedures written in
    SPSS language into a Syntax file which can then
    be stored and, when run, cause the SPSS processor
    to perform the indicated operations

78
Using Syntax
  • Well use Syntax to create TEENCH2

79
Creating TEENCH2 with Syntax
80
Creating TEENCH2 with Syntax
81
Creating TEENCH2 with Syntax
82
Creating TEENCH2 with Syntax
83
Creating TEENCH2 with Syntax
84
Creating TEENCH2 with Syntax
85
Creating TEENCH2 with Syntax
86
Creating TEENCH2 with Syntax
87
Creating TEENCH2 with Syntax
88
Constructing an Index
  • Index
  • Single score that summarizes responses to a
    number of variables
  • Used to measure an underlying concept that is not
    easily measured with a single indicator
  • Attitudes toward abortion

89
Constructing an Index
  • Dataset GSS98
  • ABANY
  • ABDEFECT
  • ABHLTH
  • ABNOMORE
  • ABPOOR
  • ABRAPE

90
Constructing an Index
  • Simplest Index is the SUM of values a score of 6
    means respondent favors abortion rights, a score
    of 0 means respondent does not
  • Well use averages, rather than sum because of
    the way missing values are treated

91
Creating ABINDX
92
Creating ABINDX
93
Creating ABINDX
94
Creating ABINDX
95
Creating ABINDX
96
Creating ABINDX
97
Creating ABINDX
Write a Comment
User Comments (0)
About PowerShow.com