RRTCS package. Application of Horvitz model to a real survey

##Horvitz model In the Horvitz model, the randomized response device presents to the sampled person labelled i a box containing a large number of identical cards, with a proportion p, (0 < p < 1) bearing the mark A and the rest marked B (an innocuous attribute whose population proportion α is known).
The response solicited denoted by zi takes the value yi if i bears A and the card drawn is marked A or if i bears B and the card drawn is marked B. Otherwise zi takes the value 0. Sin titulo

##Horvitz model example The file data “HorvitzDataRealSurvey.rda” stores a sample, extracted by simple random sampling without replacement, of size 710. With these data we estimate the prevalence of students who have sensitive characteristics set out below.
The randomized response technique used is Horvitz model (Horvitz et al, 1967 and Greenberg et al., 1969) with parameter p = 0.5

###Horvitz model survey design In this model an additional questionnaire with the following characteristics is required:

The survey is

Sin titulo
Sin titulo

To estimate results, you must have the response probabilities of non-sensitive questions:

Sin titulo
Sin titulo

###Horvitz model technique description In order to give more confidence to the respondent, he was given a booklet of instructions:

This procedure must be repeated for each question.

The respondent only had to put on the question sheet a cross in the chosen answers, and then he deposited the survey sheet in an urn.

We store the answers to senstive questions in data.frame (HorvitzDataRealSurvey.rda).

###Horvitz function We use the Horvitz function to obtain the estimates:

library("RRTCS")
N=10777
n=710
data(HorvitzDataRealSurvey)
p=0.5
alpha=c(1/12,1/10,20/30,1/10,10/30,1/12)
pi=rep(n/N,n)
cl=0.95
out1=Horvitz(HorvitzDataRealSurvey$copied,p,alpha[1],pi,"mean",cl,N)
out1
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$copied, p = p, alpha = alpha[1], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.083
## 
## Estimation: 0.8406103
## Variance: 0.001389716
## Confidence interval (95%)
##     Lower bound: 0.767545 
##     Upper bound: 0.9136756
out2=Horvitz(HorvitzDataRealSurvey$fought,p,alpha[2],pi,"mean",cl,N)
out2
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$fought, p = p, alpha = alpha[2], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.1
## 
## Estimation: 0.4070423
## Variance: 0.001045196
## Confidence interval (95%)
##     Lower bound: 0.3436776 
##     Upper bound: 0.4704069
out3=Horvitz(HorvitzDataRealSurvey$bullied,p,alpha[3],pi,"mean",cl,N)
out3
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$bullied, p = p, alpha = alpha[3], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.67
## 
## Estimation: 0.1220657
## Variance: 0.001337415
## Confidence interval (95%)
##     Lower bound: 0.05038851 
##     Upper bound: 0.1937429
out4=Horvitz(HorvitzDataRealSurvey$bullying,p,alpha[4],pi,"mean",cl,N)
out4
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$bullying, p = p, alpha = alpha[4], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.1
## 
## Estimation: 0.128169
## Variance: 0.0005597858
## Confidence interval (95%)
##     Lower bound: 0.08179667 
##     Upper bound: 0.1745414
out5=Horvitz(HorvitzDataRealSurvey$drug,p,alpha[5],pi,"mean",cl,N)
out5
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$drug, p = p, alpha = alpha[5], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.33
## 
## Estimation: 0.1286385
## Variance: 0.000991658
## Confidence interval (95%)
##     Lower bound: 0.06691805 
##     Upper bound: 0.1903589
out6=Horvitz(HorvitzDataRealSurvey$sex,p,alpha[6],pi,"mean",cl,N)
out6
## 
## Call:
## Horvitz(z = HorvitzDataRealSurvey$sex, p = p, alpha = alpha[6], 
##     pi = pi, type = "mean", cl = cl, N = N)
## 
## Qualitative model
## Horvitz model for the mean estimator
## Parameters: p=0.5; alpha=0.083
## 
## Estimation: 0.06596244
## Variance: 0.000383954
## Confidence interval (95%)
##     Lower bound: 0.02755745 
##     Upper bound: 0.1043674

##References Greenberg, B.G., Abul-Ela, A.L., Simmons, W.R., Horvitz, D.G. (1969). The unrelated question RR model: Theoretical framework. Journal of the American Statistical Association, 64, 520-539.

Horvitz, D.G., Shah, B.V., Simmons, W.R. (1967). The unrelated question RR model. Proceedings of the Social Statistics Section of the American Statistical Association. 65-72. Alexandria, VA: ASA.