Eriksson {RRTCS} | R Documentation |
Eriksson model
Description
Computes the randomized response estimation, its variance estimation and its confidence interval through the Eriksson model. The function can also return the transformed variable. The Eriksson model was proposed by Eriksson in 1973.
Usage
Eriksson(z,p,mu,sigma,pi,type=c("total","mean"),cl,N=NULL,pij=NULL)
Arguments
z |
vector of the observed variable; its length is equal to |
p |
probability of direct response |
mu |
mean of the scramble variable |
sigma |
standard deviation of the scramble variable |
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 |
Details
The randomized response given by the person labelled is
with probability
and a discrete uniform variable
with probabilities
verifying
.
Value
Point and confidence estimates of the sensitive characteristics using the Eriksson model. The transformed variable is also reported, if required.
References
Eriksson, S.A. (1973). A new model for randomized response. International Statistical Review 41, 40-43.
See Also
Examples
N=53376
data(ErikssonData)
dat=with(ErikssonData,data.frame(z,Pi))
p=0.5
mu=mean(c(0,1,3,5,8))
sigma=sqrt(4/5*var(c(0,1,3,5,8)))
cl=0.95
Eriksson(dat$z,p,mu,sigma,dat$Pi,"mean",cl,N)