rr: Statistical Methods for the Randomized Response Technique

rr is an R package which enables researchers to conduct multivariate statistical analyses of survey data with randomized response technique items from several designs, including mirrored question, forced question, and unrelated question. This includes regression with the randomized response as the outcome and logistic regression with the randomized response item as a predictor. In addition, tools for conducting power analysis for designing randomized response items are included. The package implements methods described in Blair, Imai, and Zhou (2015) "Design and Analysis of the Randomized Response Technique.”

Example using rrreg() to conduct multivariate regression analysis.


data(nigeria)
set.seed(1)

## Define design parameters
p <- 2/3 # probability of answering honestly in Forced Response Design
p1 <- 1/6 # probability of forced 'yes'
p0 <- 1/6 # probability of forced 'no'

## Fit linear regression on the randomized response item of whether respondents had direct contact to armed groups
rr.q1.reg.obj <- rrreg(rr.q1 ~ cov.asset.index + cov.married +
        I(cov.age/10) + I((cov.age/10)^2) + cov.education + cov.female,
        data = nigeria, p = p, p1 = p1, p0 = p0,
        design = "forced-known")
summary(rr.q1.reg.obj)

## Replicates Table 3 in Blair, Imai, and Zhou (2015)
 

Type install.packages(“rr”) to install in R.