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.
Eriksson(z,p,mu,sigma,pi,type=c("total","mean"),cl,N=NULL,pij=NULL)
vector of the observed variable; its length is equal to
probability of direct response
mean of the scramble variable
standard deviation of the scramble variable
vector of the first-order inclusion probabilities
the estimator type: total or mean
confidence level
size of the population. By default it is NULL
matrix of the second-order inclusion probabilities. By default it is NULL
Point and confidence estimates of the sensitive characteristics using the Eriksson model. The transformed variable is also reported, if required.
The randomized response given by the person labelled
Eriksson, S.A. (1973). A new model for randomized response. International Statistical Review 41, 40-43.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab