# Chapter 1: Example and computing

### Example: Confidence in the police

Throughout this chapter, we illustrate the statistical methods with analyses of data from the rotating module "Trust in Criminal Justice: A Comparative European Analysis" which was included in ESS Round 5 in 2010. The development of the module is documented in [Jac11a], and findings from it are reported in [Jac11b] [Jac12].

We consider the following five constructs

• trust in the effectiveness of the police (referred to as effectiveness for short)
• trust in the procedural fairness of the police (procedural fairness)
• obligation to obey the police (obligation to obey)
• moral alignment with the police (moral alignment)
• willingness to co-operate with the police and the criminal justice system (co-operation).

A theoretical model for how the constructs are expected to be related to each other is represented by Figure 1.1. This is a simplification and modification of the model in Figure 1 of [Jac12]. In this model, obligation to obey and moral alignment are regarded as dependent on effectiveness and procedural fairness, and co-operation is regarded as dependent on all the other four constructs. A non-zero correlation is allowed between effectiveness and procedural fairness, and a non-zero residual correlation between obligation to obey and moral alignment (denoted by the double headed arrows in the figure).

Figure 1.1: Theoretical model for the relationships of the constructs in the example.

In a cross-national analysis of these constructs, we may want to answer the following types of research questions:

• How are the constructs measured by survey items? Do the items behave similarly in different countries?
• How do the means and variances of the constructs vary between countries?
• Is the model in Figure 1.1 a good representation of the relationships between the constructs? Is it appropriate for all countries?
• How do the strengths of the associations between the constructs vary across countries?

Page 1

# Data and variables

We use data from ESS Round 5, for n=52,458 respondents from 27 countries. Each of the five constructs was measured with three items, as follows (where D12 etc. are the numbers of the questions in the ESS questionnaire):

Table 1.1. Theoretical constructs and their associated ESS question numbers
Trust in police effectiveness Trust in police procedural fairness Obligation to obey the police Moral alignment with the police Willingness to co-operate with the criminal justice system
D12-D14 D15-D17 D18-D20 D21-D23 D40-D42

Below we give the wording of each item, and their response options. For each item, missing value responses ("Don"t know", "Refusal", "No Answer") and other hidden response options ("Violent crimes never occur near to where I live" for D14 and "No one ever asks the police to explain their decisions and actions" for D17) are treated as missing. "Label" shows the name of the variable in the ESS dataset.

Question Label Response Scale
D12 Based on what you have heard or your own experience how successful do you think the police are at preventing crimes in [country] where violence is used or threatened? plcpvcr 0 Extremely unsuccessful
1
2
3
4
5
6
7
8
9
10 Extremely successful
D13 How successful do you think the police are at catching people who commit house burglaries in [country]? plccbrg
D14 If a violent crime were to occur near to where you live and the police were called, how slowly or quickly do you think they would arrive at the scene? plcarcr
0 Extremely slowly
1
2
3
4
5
6
7
8
9
10 Extremely quickly

Question Label Response Scale
D15 Based on what you have heard or your own experience how often would you say the police generally treat people in [country] with respect? plcrspc 1 Not at all often

2 Not very often

3 Often

4 Very often
D16 About how often would you say that the police make fair, impartial decisions in the cases they deal with? plcfrdc
D17 When dealing with people in [country], how often would you say the police generally explain their decisions and actions when asked to do so? plcexdc

Question
To what extent is it your duty to…
Label Response Scale
D18 …back the decisions made by the police even when you disagree with them? bplcdc 0 Not at all my duty
1
2
3
4
5
6
7
8
9
10 Completely my duty
D19 …do what the police tell you even if you don’t understand or agree with the reasons? doplcsy
D20 …do what the police tell you to do, even if you don’t like how they treat you? dpcstrb

Question Label Response Scale
D21 The police generally have the same sense of right and wrong as I do. plcrgwr 1 Disagree strongly

2 Disagree

3 Neither agree nor disagree

4 Agree

5 Agree strongly
D22 The police stand up for values that are important to people like me. plcipvl
D23 I generally support how the police usually act. gsupplc

Note: In the original ESS dataset, the response options are coded in a reverse order, from 1=Agree strongly to 5=Disagree strongly. The coding has been reversed in our analyses to make interpretation more convenient. Instructions for how this is done in Stata and R are given in the next section.

Question Label Response Scale
D40 Imagine that you were out and saw someone push a man to the ground and steal his wallet. How likely would you be to call the police? caplcst 1 Not at all likely / willing

2 Not very likely / willing

3 Likely / willing

4 Very likely / willing
D41 How willing would you be to identify the person who had done it? widprsn
D42 And how willing would you be to give evidence in court against the accused? wevdct

The items are coded in such a way (after reversing the original codes for D21-D23) that in each case higher-numbered response options indicate more positive attitudes toward the police and criminal justice system, that is higher levels of trust in police effectiveness and procedural fairness, higher levels of felt obligation to obey and moral alignment with the police, and higher levels of willingness to co-operate with the criminal justice system.

Page 2

# Datasets and software

### Software: Stata and R

In this module, instructions for fitting the models will be provided for two statistical software packages, Stata and R. We assume that you are reasonably familiar with the use of at least one of these packages in general.

### Datasets

The Stata data file was obtained by downloading the full ESS5 Stata data file from the ESS website. It was then reduced to the file used here by keeping only the 15 variables listed in the previous section, plus the variables idno (respondent ID) and cntry (country of the respondent).

The Stata file was then imported into R using the read.dta function from the foreign package in R, and saved from R as ESS5Police.RData.

If you started with a dataset in SPSS, you could save it as a Stata data file directly from SPSS. To import the SPSS data file into R, you could use the read.spss function from the foreign package in R.

In Stata, you then open the data file using the File → Open menu, and in R using the File → Load Workspace menu.

### Command files

Stata and R commands for data preparation and data analysis exercises for these data are given throughout this module. All of the commands for these different steps are also included in single files which you can download by clicking on the links below:

### Preliminary analysis: Missing values and recoding some items

Before you can start analysing the data, you should carry out the following two steps of data processing:

• Coding the values of the variables which should be regarded as missing in such a way that the software will treat them as missing values.
• Reversing the coding of the items D21-D23 (variables plcrgwr, plcipvl and gsupplc) as discussed in the previous section.
See below for the commands for carrying out these steps:

Stata commands: To run this and any other commands included in this module, you can copy and paste them into the do-file editor in Stata, and run the commands from there. These commands assume that you have first opened the data file ESS5Police.dta in Stata, as described above. After you run the commands here, save the data file again to save the changes.

// Open the data file ESS5Police.dta in Stata
// Preliminary data processing:
* Recoding some values of the variables as missing:
mvdecode plcrspc plcfrdc plcexdc ///
plcrgwr plcipvl gsupplc ///
caplcst widprsn wevdct, mv(7 8 9)
mvdecode plcpvcr plccbrg plcarcr ///
bplcdc doplcsy dpcstrb, mv(77 88 99)
mvdecode plcexdc, mv(5)
mvdecode plcarcr, mv(55)
* Reversing the coding of three items:
replace plcrgwr=6-plcrgwr
replace plcipvl=6-plcipvl
replace gsupplc=6-gsupplc
label define plcrgwr 1 "Disagree strongly" 2 "Disagree" ///
3 "Neither agree nor disagree" 4 "Agree" 5 "Agree strongly", replace
label copy plcrgwr plcipvl, replace
label copy plcrgwr gsupplc, replace
// Save the data file ESS5Police.dta, to save these changes

R commands: : To run this and any other commands included in this module, you can copy and paste them into the script editor in R, and run the commands from there. These commands assume that you have first loaded the data into R, as described above. After you run these commands, the data will be in the data frame ESS5Police, ready for the analyses.

# Load the file ESS5Police.Rdata to R
# if you have not done so previously. This loads the data frame ESS5Police.
# Preliminary data processing:
# Recoding some values of the variables as missing:
for(v.tmp in c("plcrspc", "plcfrdc", "plcexdc",
"plcrgwr", "plcipvl", "gsupplc",
"caplcst", "widprsn", "wevdct")){
tmp <- ESS5Police[,v.tmp]
ESS5Police[(tmp==7 | tmp==8 | tmp==9)&!is.na(tmp),v.tmp] <- NA
}
for(v.tmp in c("plcpvcr","plccbrg","plcarcr",
"bplcdc","doplcsy", "dpcstrb")){
tmp <- ESS5Police[,v.tmp]
ESS5Police[(tmp==77 | tmp==88 | tmp==99)&!is.na(tmp),v.tmp] <- NA
}