Skip to content
StatsOtter A workspace for causal thinking
Method library WORKFLOW / 075
Research workflow/2 steps

Sensitive questions, protected answers (rr)

01
The method workspace

Follow the analysis.

Select a node to explore the method

Method mapInput → 2 steps → output
START WITHInput data
ARRIVE ATResults
Read step 01
Inside the methodReasoning, equations & implementation
Step 1 of 2
01
Data prep

Load the survey data

Data preparation — shapes the raw inputs into what the estimator expects.

What happens here

Use the Nigeria randomized-response survey, with the design probabilities for the forced-known design.

Reads fromNot specified Feeds into#2
Key code
# Install:  install.packages("rr")
library(rr)
data(nigeria)
set.seed(1)

Reference / docs ↗

Discussion on this step (0)
StatsOtterDiscussion starter · Editorial note

Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.

Questions to explore
  1. Which assumption matters most here, and what evidence could challenge it?
  2. What would you check before passing this output to the next step?

Peer discussion

  • Bring your experience, a question, or a different perspective.
02
Data contract

Inputs & data

Survey data with the randomized-response item and predictor covariates.

Show data format & exampleHide example
rr.q1 asset.index married age
1 0.4 1 41
0 -1.1 0 33
1 0.9 1 52
0 0.2 0 29
03
Read the evidence

Results & interpretation

1 figure Workflow discussion 0
01FigureRandomized-response regression coefficients (95% CIs) for predictors of the sensitive behavior.

Result figure rendered by StatsOtter from the package's documented example — unofficial community showcase; all credit to the original authors.

The estimate

\Pr(Z_i^=1\mid x_i)=\mathrm{logit}^{-1}(x_i^\top\beta),\quad Y_i=\text{noisy RR of }Z_i^

Context & interpretation

⚠️ Unofficial community showcase of rr (docs). Not affiliated with the authors — all credit to Graeme Blair, Yang-Yang Zhou & Kosuke Imai; this summarizes public documentation.

What it does. The randomized-response technique lets people answer a sensitive yes/no question truthfully without revealing their answer, because a coin (known probability) sometimes dictates the response. rr (Blair, Imai & Zhou 2015) provides the multivariate regression that recovers how covariates predict the latent truthful response.

How it works. Given the design probabilities (mirrored, forced-known, or unrelated-question), rrreg() fits a maximum-likelihood logistic model for the latent sensitive trait, deconvolving the randomization noise. Companion functions predict prevalence and combine RR with direct questions.

Assumptions. Respondents follow the randomization device and answer truthfully under its protection; the design probabilities are known.

What you get — Logistic-regression coefficients (with SEs) linking covariates to the latent sensitive response, despite the privacy noise.

Example output

Randomized Response Technique Regression 

Estimated coefficients (logistic):
                     est     se      z    p
(Intercept)        -0.91  0.27  -3.37  0.00
cov.asset.index     0.14  0.06   2.33  0.02
cov.married         0.32  0.18   1.78  0.08
age                 0.01  0.01   1.02  0.31

Design: forced-known   N = 2400

Links: package · paper

Peer notes

Discuss the workflow (0)

  • No comments yet — start the conversation.
IN THE MARGINS

Peer discussion