Learn R Programming

RRTCS (version 0.0.4)

Eriksson: 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 \(n\) (the sample size)

p

probability of direct response

mu

mean of the scramble variable \(S\)

sigma

standard deviation of the scramble variable \(S\)

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 Eriksson model. The transformed variable is also reported, if required.

Details

The randomized response given by the person labelled \(i\) is \(y_i\) with probability \(p\) and a discrete uniform variable \(S\) with probabilities \(q_1,q_2,...,q_j\) verifying \(q_1+q_2+...+q_j=1-p\).

References

Eriksson, S.A. (1973). A new model for randomized response. International Statistical Review 41, 40-43.

See Also

ErikssonData

ResamplingVariance

Examples

Run this code
# 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