`rrreg`

is used to conduct multivariate regression analyses of survey
data using randomized response methods.

1 2 3 4 |

`formula` |
An object of class "formula": a symbolic description of the model to be fitted. |

`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). For "mirrored" and "disguised" designs, p cannot equal .5. |

`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: "forced-known", "mirrored", "disguised", or "unrelated-known". |

`data` |
A data frame containing the variables in the model. |

`start` |
Optional starting values of coefficient estimates for the Expectation-Maximization (EM) algorithm. |

`h` |
Auxiliary data functionality. Optional named numeric vector with length equal to number of groups. Names correspond to group labels and values correspond to auxiliary moments. |

`group` |
Auxiliary data functionality. Optional character vector of group labels with length equal to number of observations. |

`matrixMethod` |
Auxiliary data functionality. Procedure for estimating
optimal weighting matrix for generalized method of moments. One of
"efficient" for two-step feasible and "cue" for continuously updating.
Default is "efficient". Only relevant if |

`maxIter` |
Maximum number of iterations for the Expectation-Maximization
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 quasi-Newton
"BFGS" method to calculate the variance-covariance 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 |

`solve.tolerance` |
When standard errors are calculated, this option specifies the tolerance of the matrix inversion operation solve. |

This function allows users to perform multivariate regression analysis on data from the randomized response technique. Four standard designs are accepted by this function: mirrored question, forced response, disguised response, and unrelated question. The method implemented by this function is the Maximum Likelihood (ML) estimation for the Expectation-Maximization (EM) algorithm.

`rrreg`

returns an object of class "rrreg". The function
`summary`

is used to obtain a table of the results. The object
`rrreg`

is a list that contains the following components (the inclusion
of some components such as the design parameters are dependent upon the
design used):

`est` |
Point estimates for the effects of covariates on the randomized response item. |

`vcov` |
Variance-covariance matrix for the effects of covariates on the randomized response item. |

`se` |
Standard errors for estimates of the effects of covariates on the randomized response item. |

`data` |
The |

`coef.names` |
Variable names as defined in the data frame. |

`x` |
The model matrix of covariates. |

`y` |
The randomized response vector. |

`design` |
Call of standard design used: "forced-known", "mirrored", "disguised", or "unrelated-known". |

`p` |
The |

`p0` |
The |

`p1` |
The |

`q` |
The |

`call` |
The matched call. |

Blair, Graeme, Kosuke Imai and Yang-Yang Zhou. (2014) "Design and Analysis of the Randomized Response Technique." Working Paper. Available at http://imai.princeton.edu/research/randresp.html.

`predict.rrreg`

for predicted probabilities.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
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
## citizen respondents had direct social contacts 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 (2014)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.