Eriksson: Eriksson model

Description Usage Arguments Details Value References See Also Examples

View source: R/Eriksson.R

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

1
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

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.

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

ErikssonData

ResamplingVariance

Examples

1
2
3
4
5
6
7
8
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)

RRTCS documentation built on April 21, 2021, 9:06 a.m.