Learn R Programming

RRTCS (version 0.0.4)

Devore: Devore model

Description

Computes the randomized response estimation, its variance estimation and its confidence interval through the Devore model. The function can also return the transformed variable. The Devore model was proposed by Devore in 1977.

Usage

Devore(z,p,pi,type=c("total","mean"),cl,N=NULL,pij=NULL)

Arguments

z

vector of the observed variable; its length is equal to \(n\) (the sample size)

p

proportion of cards bearing the mark \(A\)

pi

vector of the first-order inclusion probabilities

type

the estimator type: total or mean

cl

confidence level

N

size of the population. By default it is NULL

pij

matrix of the second-order inclusion probabilities. By default it is NULL

Value

Point and confidence estimates of the sensitive characteristics using the Devore model. The transformed variable is also reported, if required.

Details

In the Devore model, the randomized response device presents to the sampled person labelled \(i\) a box containing a large number of identical cards with a proportion \(p,(0<p<1)\) bearing the mark \(A\) and the rest marked \(B\) (an innocuous attribute). The response solicited denoted by \(z_i\) takes the value \(y_i\) if \(i\) bears \(A\) and the card drawn is marked \(A\). Otherwise \(z_i\) takes the value 1.

The transformed variable is \(r_i=\frac{z_i-(1-p)}{p}\) and the estimated variance is \(\widehat{V}_R(r_i)=r_i(r_i-1)\).

References

Devore, J.L. (1977). A note on the randomized response technique. Communications in Statistics Theory and Methods 6: 1525-1529.

See Also

DevoreData

ResamplingVariance

Examples

Run this code
# NOT RUN {
data(DevoreData)
dat=with(DevoreData,data.frame(z,Pi))
p=0.7
cl=0.95
Devore(dat$z,p,dat$Pi,"total",cl)
# }

Run the code above in your browser using DataLab