Description Usage Arguments Details Value References See Also Examples
Computes the randomized response estimation, its variance estimation and its confidence interval through the Horvitz model. The function can also return the transformed variable. The Horvitz model was proposed by Horvitz et al. (1967) and by Greenberg et al. (1969).
1 |
z |
vector of the observed variable; its length is equal to n (the sample size) |
p |
proportion of marked cards with the sensitive question |
alpha |
proportion of people with the innocuous attribute |
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 |
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 z_i takes the value y_i if i bears A and the card drawn is marked A or if i bears B and the card drawn is marked B. Otherwise z_i takes the value 0.
The transformed variable is r_i=\frac{z_i-(1-p)α}{p} and the estimated variance is \widehat{V}_R(r_i)=r_i(r_i-1).
Point and confidence estimates of the sensitive characteristics using the Horvitz model. The transformed variable is also reported, if required.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | N=10777
data(HorvitzData)
dat=with(HorvitzData,data.frame(z,Pi))
p=0.5
alpha=0.6666667
cl=0.95
Horvitz(dat$z,p,alpha,dat$Pi,"mean",cl,N)
#Horvitz real survey
N=10777
n=710
data(HorvitzDataRealSurvey)
p=0.5
alpha=1/12
pi=rep(n/N,n)
cl=0.95
Horvitz(HorvitzDataRealSurvey$sex,p,alpha,pi,"mean",cl,N)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.