Learn R Programming

twang (version 2.6.1)

raceprofiling: Traffic stop data

Description

Simulated example data for assessing race bias in traffic stop outcomes

Usage

data(raceprofiling)

Arguments

Format

A data frame with 5000 observations on the following 10 variables.

id

an ID for each traffic stop

nhood

a factor indicating the neighborhood in which the stop occurred.

reason

The reason for the stop, mechanical/registration violations, dangerous moving violation, non-dangerous moving violation

resident

an indicator whether the driver is a resident of the city

age

driver's age

male

an indicator whether the driver was male

race

the race of the driver, with levels A, B, H, W

hour

the hour of the stop (24-hour clock)

month

and ordered factor indicating in which month the stop took place

citation

an indicator of whether the driver received a citation

References

G. Ridgeway (2006). “Assessing the effect of race bias in post-traffic stop outcomes using propensity scores,” Journal of Quantitative Criminology 22(1).

Examples

Run this code
data(raceprofiling)

# the first five lines of the dataset
raceprofiling[1:5,]

Run the code above in your browser using DataLab