Warner: Warner model

Description Usage Arguments Details Value References See Also Examples

View source: R/Warner.R

Description

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

Usage

1
Warner(z,p,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)

p

proportion of marked cards with the sensitive 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

Details

Warner's randomized response device works as follows. A sampled person labelled i is offered a box of a considerable number of identical cards with a proportion p,(0<p<1,p\neq 0.5) of them marked A and the rest marked A^c. The person is requested, randomly, to draw one of them, to observe the mark on the card, and to give the response

z_i=≤ft\{\begin{array}{lcc} 1 & \textrm{if card type "matches" the trait } A \textrm{ or } A^c \\ 0 & \textrm{if a "no match" results } \end{array} \right.

The randomized response is given by r_i=\frac{z_i-(1-p)}{2p-1} and the estimated variance is \widehat{V}_R(r_i)=r_i(r_i-1).

Value

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

References

Warner, S.L. (1965). Randomized Response: a survey technique for eliminating evasive answer bias. Journal of the American Statistical Association 60, 63-69.

See Also

WarnerData

ResamplingVariance

Examples

1
2
3
4
5
6
N=802
data(WarnerData)
dat=with(WarnerData,data.frame(z,Pi))
p=0.7
cl=0.95
Warner(dat$z,p,dat$Pi,"total",cl)

Example output

Call:
Warner(z = dat$z, p = p, pi = dat$Pi, type = "total", cl = cl)

Qualitative model
Warner model for the total estimator
Parameters: p=0.7

Estimation: 361
Variance: 7883.337
Confidence interval (95%)
    Lower bound: 186.8784 
    Upper bound: 534.9216 

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