rrreg.predictor
is used to jointly model the randomized response item
as both outcome and predictor for an additional outcome given a set of
covariates.
rrreg.predictor(formula, p, p0, p1, q, design, data, rr.item, model.outcome = "logistic", fit.sens = "bayesglm", fit.outcome = "bayesglm", bstart = NULL, tstart = NULL, parstart = TRUE, maxIter = 10000, verbose = FALSE, optim = FALSE, em.converge = 10^(4), glmMaxIter = 20000, estconv = TRUE, solve.tolerance = .Machine$double.eps)
formula  An object of class "formula": a symbolic description of the model to be fitted with the randomized response item as one of the covariates. 

p  The probability of receiving the sensitive question (Mirrored Question Design, Unrelated Question Design); the probability of answering truthfully (Forced Response Design); the probability of selecting a red card from the 'yes' stack (Disguised Response Design). 
p0  The probability of forced 'no' (Forced Response Design). 
p1  The probability of forced 'yes' (Forced Response Design). 
q  The probability of answering 'yes' to the unrelated question, which is assumed to be independent of covariates (Unrelated Question Design). 
design  One of the four standard designs: "forcedknown", "mirrored", "disguised", or "unrelatedknown". 
data  A data frame containing the variables in the model. Observations with missingness are listwise deleted. 
rr.item  A string containing the name of the randomized response item variable in the data frame. 
model.outcome  Currently the function only allows for logistic regression, meaning the outcome variable must be binary. 
fit.sens  Indicator for whether to use Bayesian generalized linear
modeling (bayesglm) in the Maximization step for the
ExpectationMaximization (EM) algorithm to generate coefficients for the
randomized response item as the outcome. Default is 
fit.outcome  Indicator for whether to use Bayesian generalized linear
modeling (bayesglm) in the Maximization step for the EM algorithm to
generate coefficients for the outcome variable given in the formula with the
randomized response item as a covariate. Default is 
bstart  Optional starting values of coefficient estimates for the randomized response item as outcome for the EM algorithm. 
tstart  Optional starting values of coefficient estimates for the outcome variable given in the formula for the EM algorithm. 
parstart  Option to use the function 
maxIter  Maximum number of iterations for the ExpectationMaximization
algorithm. The default is 
verbose  A logical value indicating whether model diagnostics counting
the number of EM iterations are printed out. The default is 
optim  A logical value indicating whether to use the quasiNewton
"BFGS" method to calculate the variancecovariance matrix and standard
errors. The default is 
em.converge  A value specifying the satisfactory degree of convergence
under the EM algorithm. The default is 
glmMaxIter  A value specifying the maximum number of iterations to run
the EM algorithm. The default is 
estconv  Option to base convergence on the absolute value of the
difference between subsequent coefficients generated through the EM
algorithm rather than the subsequent loglikelihoods. The default is

solve.tolerance  When standard errors are calculated, this option specifies the tolerance of the matrix inversion operation solve. 
rrreg.predictor
returns an object of class "rrpredreg"
associated with the randomized response item as predictor. The object
rrpredreg
is a list that contains the following components (the
inclusion of some components such as the design parameters are dependent
upon the design used):
Point estimates for the effects of the randomized response item as predictor and other covariates on the separate outcome variable specified in the formula.
Standard errors for estimates of the effects of the randomized response item as predictor and other covariates on the separate outcome variable specified in formula.
Point estimates for the effects of covariates on the randomized response item.
Variancecovariance matrix for estimates of the effects of the randomized response item as predictor and other covariates on the separate outcome variable specified in formula as well as for estimates of the effects of covariates on the randomized response item.
Standard errors for estimates of the effects of covariates on the randomized response item.
The data
argument.
Variable names as defined in the data frame.
The model matrix of covariates.
The randomized response vector.
The separate outcome of interest vector.
Call of standard design used: "forcedknown", "mirrored", "disguised", or "unrelatedknown".
The
p
argument.
The p0
argument.
The
p1
argument.
The q
argument.
The matched call.
This function allows users to perform multivariate regression analysis with the randomized response item as a predictor for a separate outcome of interest. It does so by jointly modeling the randomized response item as both outcome and predictor for an additional outcome given the same set of covariates. Four standard designs are accepted by this function: mirrored question, forced response, disguised response, and unrelated question.
Blair, Graeme, Kosuke Imai and YangYang Zhou. (2014) "Design and Analysis of the Randomized Response Technique." Working Paper. Available at http://imai.princeton.edu/research/randresp.html.
rrreg
for multivariate regression.
data(nigeria) ## Define design parameters set.seed(44) 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 joint model of responses to an outcome regression of joining a civic ## group and the randomized response item of having a militant social connection# NOT RUN { rr.q1.pred.obj < rrreg.predictor(civic ~ cov.asset.index + cov.married + I(cov.age/10) + I((cov.age/10)^2) + cov.education + cov.female + rr.q1, rr.item = "rr.q1", parstart = FALSE, estconv = TRUE, data = nigeria, verbose = FALSE, optim = TRUE, p = p, p1 = p1, p0 = p0, design = "forcedknown") summary(rr.q1.pred.obj) # }## Replicates Table 4 in Blair, Imai, and Zhou (2014)