getPW  R Documentation 
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)
model 
one of the available models in the package 
p 
randomization probability 
group 
group index (1 or 2) for twogroup designs such as

par2 
the second, estimated parameter in twogroup designs (e.g., the
unknown prevalence of the irrelevant question in 
Kukrep 
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 twogroup 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.