Description Usage Arguments Details Value References See Also Examples
Computes the randomized response estimation, its variance estimation and its confidence interval through the BarLev model. The function can also return the transformed variable. The BarLev model was proposed by Bar-Lev et al. in 2004.
1 |
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 |
The randomized response given by the person i is
z_i=≤ft\{\begin{array}{lcc} y_i & \textrm{with probability } p\\ y_iS & \textrm{with probability } 1-p\\ \end{array} \right.
where S is a scramble variable, whose mean μ and standard deviation σ are known.
Point and confidence estimates of the sensitive characteristics using the BarLev model. The transformed variable is also reported, if required.
Bar-Lev S.K., Bobovitch, E., Boukai, B. (2004). A note on randomized response models for quantitative data. Metrika, 60, 255-260.
1 2 3 4 5 6 7 | data(BarLevData)
dat=with(BarLevData,data.frame(z,Pi))
p=0.6
mu=1
sigma=1
cl=0.95
BarLev(dat$z,p,mu,sigma,dat$Pi,"total",cl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.