getPW: Get Misclassification Matrices for RR Models

View source: R/RRlin_getPW.R

getPWR Documentation

Get Misclassification Matrices for RR Models


Given some randomization probabilities p, each RR design corresponds to a misclassification matrix PW. This square matrix has entries defined as: PW[i,j] = P(respond i | true state j).


getPW(model, p, group = 1, par2 = NULL, Kukrep = 1)



one of the available models in the package RRreg:


randomization probability


group index (1 or 2) for two-group designs such as "UQTunknown" or "SLD"


the second, estimated parameter in two-group designs (e.g., the unknown prevalence of the irrelevant question in "UQTunknown", the t-parameter for truth in the "SLD")


number of replications in Kuk's RR design (how many cards are drawn)


The method is used internally for estimation. Moreover, the method might be useful to check the exact definition of the RR designs.

Note that for two-group designs, the matrix depends on a second parameter that is estimated from the data (e.g., the unknown prevalence of the unknown question in the unrelated question technique). Hence, the matrix itself is not constant, but an estimate of a random variable itself.


van den Hout, A., & Kooiman, P. (2006). Estimating the Linear Regression Model with Categorical Covariates Subject to Randomized Response. Computational Statistics & Data Analysis, 50(11), 3311–3323.


getPW(model = "Warner", p = 2 / 12)
getPW(model = "UQTknown", p = c(2 / 12, .3))
getPW(model = "UQTunknown", p = c(2 / 12, .10 / 12), group = 2, par2 = .4)

danheck/RRreg documentation built on Dec. 3, 2022, 7:50 p.m.