bc_est is used to apply a bias-corrected crosswise estimator to survey data.

bc_est(Y, A, p, p.prime, weight, data, seed = NULL)

bc.est(...)

Arguments

Y

a vector of binary responses in the crosswise question (Y=1 if TRUE-TRUE or FALSE-FALSE, Y=0 otherwise).

A

a vector of binary responses in the anchor question (A=1 if TRUE-TRUE or FALSE-FALSE, A=0 otherwise).

p

an auxiliary probability for the crosswise question.

p.prime

an auxiliary probability for the anchor question.

weight

an optional vector specifying sample weights in data.

data

a data frame containing information from the crosswise model (Y, A, weight).

seed

Optional integer used to reproduce the bootstrap uncertainty estimate. When supplied, the caller's random-number state is restored after the function returns.

...

Arguments passed to bc_est().

Value

A list with:

Results

A two-row matrix of naive and bias-corrected prevalence estimates, standard errors, and 95 percent confidence intervals.

Stats

A matrix containing the estimated attentive-response rate and the number of complete observations.

References

Atsusaka, Y. and Stevenson, R. T. (2023). The crosswise model for sensitive survey questions. doi:10.1017/pan.2021.43 .

See also

[cmBound()] for a sensitivity analysis of naive crosswise estimates.

Examples

bc_est(Y=Y, A=A, p=0.15, p.prime=0.15, data=cmdata)
#> $Results
#>                 Estimate Std. Error 95%CI(Low) 95%CI(Up)
#> Naive Crosswise   0.1950     0.0144     0.1667    0.2233
#> Bias-Corrected    0.1054     0.0214     0.0679    0.1529
#> 
#> $Stats
#>  Attentive Rate Sample Size
#>          0.7729        2000
#> 
bc_est(Y=Y, A=A, weight=weight, p=0.15, p.prime=0.15, data=cmdata)
#> $Results
#>                 Estimate Std. Error 95%CI(Low) 95%CI(Up)
#> Naive Crosswise   0.1921     0.0144     0.1639    0.2204
#> Bias-Corrected    0.1097     0.0260     0.0567    0.1572
#> 
#> $Stats
#>  Attentive Rate Sample Size
#>          0.7888        2000
#>