Christofides: Christofides model

Description Usage Arguments Details Value References See Also Examples

View source: R/Christofides.R

Description

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

Usage

1
Christofides(z,mm,pm,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)

mm

vector with the marks of the cards

pm

vector with the probabilities of previous marks

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

In the Christofides randomized response technique, a sampled person i is given a box with identical cards, each bearing a separate mark as 1,…,k,… m with m≥q 2 but in known proportions p_1,…,p_k,… p_m with 0<p_k< 1 for k=1,…,m and ∑_{k=1}^{m}p_k=1. The person sampled is requested to draw one of the cards and respond

z_i=≤ft \{\begin{array}{lcc} k & \textrm{if a card marked } k \textrm{ is drawn and the person bears } A^c\\ m-k+1 & \textrm{if a card marked } k \textrm{ is drawn but the person bears } A \end{array} \right .

The transformed variable is r_i=\frac{z_i-μ}{m+1-2μ} where μ=∑_{k=1}^{m}kp_k and the estimated variance is \widehat{V}_R(r_i)=\frac{V_R(k)}{(m+1-2μ)^2}, where V_R(k)=∑_{k=1}^{m}k^2p_k-μ^2.

Value

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

References

Christofides, T.C. (2003). A generalized randomized response technique. Metrika, 57, 195-200.

See Also

ChristofidesData

ResamplingVariance

Examples

1
2
3
4
5
6
7
N=802
data(ChristofidesData)
dat=with(ChristofidesData,data.frame(z,Pi))
mm=c(1,2,3,4,5)
pm=c(0.1,0.2,0.3,0.2,0.2)
cl=0.95
Christofides(dat$z,mm,pm,dat$Pi,"mean",cl,N)

Example output

Call:
Christofides(z = dat$z, mm = mm, pm = pm, pi = dat$Pi, type = "mean", 
    cl = cl, N = N)

Qualitative model
Christofides model for the mean estimator
Parameters: mm1=1; mm2=2; mm3=3; mm4=4; mm5=5; pm1=0.1; pm2=0.2; pm3=0.3; pm4=0.2; pm5=0.2

Estimation: 0.45
Variance: 0.06238559
Confidence interval (95%)
    Lower bound: -0.03954232 
    Upper bound: 0.9395423 

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