Description Usage Arguments Details Value References See Also Examples
View source: R/ChaudhuriChristofides.R
Computes the randomized response estimation, its variance estimation and its confidence interval through the Chaudhuri-Christofides model. The function can also return the transformed variable. The Chaudhuri-Christofides model can be seen in Chaudhuri and Christofides (2013, page 97).
1 |
z |
vector of the observed variable; its length is equal to n (the sample size) |
mu |
vector with the means of the scramble variables |
sigma |
vector with the standard deviations of the scramble variables |
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 |
The randomized response given by the person i is z_i=y_iS_1+S_2 where S_1,S_2 are scramble variables, whose mean μ and standard deviation σ are known.
Point and confidence estimates of the sensitive characteristics using the Chaudhuri-Christofides model. The transformed variable is also reported, if required.
Chaudhuri, A., and Christofides, T.C. (2013) Indirect Questioning in Sample Surveys. Springer-Verlag Berlin Heidelberg.
1 2 3 4 5 6 7 8 | N=417
data(ChaudhuriChristofidesData)
dat=with(ChaudhuriChristofidesData,data.frame(z,Pi))
mu=c(6,6)
sigma=sqrt(c(10,10))
cl=0.95
data(ChaudhuriChristofidesDatapij)
ChaudhuriChristofides(dat$z,mu,sigma,dat$Pi,"mean",cl,pij=ChaudhuriChristofidesDatapij)
|
Call:
ChaudhuriChristofides(z = dat$z, mu = mu, sigma = sigma, pi = dat$Pi,
type = "mean", cl = cl, pij = ChaudhuriChristofidesDatapij)
Quantitative model
Chaudhuri and Christofides model for the mean estimator
Parameters: mu1=6; mu2=6; sigma1=3.2; sigma2=3.2
Estimation: 6479.657
Variance: 257283.4
Confidence interval (95%)
Lower bound: 5485.503
Upper bound: 7473.812
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.