svyciprop.Rd
Computes confidence intervals for proportions using methods that may be
more accurate near 0 and 1 than simply using confint(svymean())
.
Model formula specifying a single binary variable
survey design object
See Details below. Partial matching is done on the argument.
Confidence level for interval
denominator degrees of freedom, for all methods except
"beta"
. Use Inf
for confidence intervals based on a
Normal distribution, and for "likelihood"
and "logit"
use NULL
for the default method in glms (currently
degf(design)-1
, but this may be improved in the future)
For "mean"
and "asin"
, this is passed to confint.svystat
The "logit"
method fits a logistic regression model and computes a
Wald-type interval on the log-odds scale, which is then transformed to
the probability scale.
The "likelihood"
method uses the (Rao-Scott) scaled chi-squared distribution
for the loglikelihood from a binomial distribution.
The "asin"
method uses the variance-stabilising transformation
for the binomial distribution, the arcsine square root, and then
back-transforms the interval to the probability scale
The "beta"
method uses the incomplete beta function as in
binom.test
, with an effective sample size based on the
estimated variance of the proportion. (Korn and Graubard, 1998)
The "xlogit"
method uses a logit transformation of the mean and
then back-transforms to the probablity scale. This appears to be the
method used by SUDAAN and SPSS COMPLEX SAMPLES.
The "mean"
method is a Wald-type interval on the probability
scale, the same as confint(svymean())
All methods undercover for probabilities close enough to zero or one,
but "beta"
, "likelihood"
, "logit"
, and "logit"
are noticeably
better than the other two. None of the methods will work when the
observed proportion is exactly 0 or 1.
The confint
method extracts the confidence interval; the
vcov
and SE
methods just report the variance or standard
error of the mean.
The point estimate of the proportion, with the confidence interval as an attribute
Rao, JNK, Scott, AJ (1984) "On Chi-squared Tests For Multiway Contingency Tables with Proportions Estimated From Survey Data" Annals of Statistics 12:46-60.
Korn EL, Graubard BI. (1998) Confidence Intervals For Proportions With Small Expected Number of Positive Counts Estimated From Survey Data. Survey Methodology 23:193-201.
data(api)
dclus1<-svydesign(id=~dnum, fpc=~fpc, data=apiclus1)
svyciprop(~I(ell==0), dclus1, method="li")
#> 2.5% 97.5%
#> I(ell == 0) 0.021858 0.000664 0.11
svyciprop(~I(ell==0), dclus1, method="lo")
#> 2.5% 97.5%
#> I(ell == 0) 0.0219 0.0023 0.18
svyciprop(~I(ell==0), dclus1, method="as")
#> 2.5% 97.5%
#> I(ell == 0) 0.021858 0.000307 0.1
svyciprop(~I(ell==0), dclus1, method="be")
#> 2.5% 97.5%
#> I(ell == 0) 0.021858 0.000216 0.14
svyciprop(~I(ell==0), dclus1, method="me")
#> 2.5% 97.5%
#> I(ell == 0) 0.0219 -0.0267 0.07
svyciprop(~I(ell==0), dclus1, method="xl")
#> 2.5% 97.5%
#> I(ell == 0) 0.0219 0.0023 0.18
## reproduces Stata svy: mean
svyciprop(~I(ell==0), dclus1, method="me", df=degf(dclus1))
#> 2.5% 97.5%
#> I(ell == 0) 0.0219 -0.0267 0.07
## reproduces Stata svy: prop
svyciprop(~I(ell==0), dclus1, method="lo", df=degf(dclus1))
#> 2.5% 97.5%
#> I(ell == 0) 0.0219 0.0023 0.18
rclus1<-as.svrepdesign(dclus1)
svyciprop(~I(emer==0), rclus1, method="li")
#> 2.5% 97.5%
#> I(emer == 0) 0.191 NA NA
svyciprop(~I(emer==0), rclus1, method="lo")
#> 2.5% 97.5%
#> I(emer == 0) 0.1913 0.0922 0.36
svyciprop(~I(emer==0), rclus1, method="as")
#> 2.5% 97.5%
#> I(emer == 0) 0.1913 0.0795 0.34
svyciprop(~I(emer==0), rclus1, method="be")
#> 2.5% 97.5%
#> I(emer == 0) 0.1913 0.0785 0.36
svyciprop(~I(emer==0), rclus1, method="me")
#> 2.5% 97.5%
#> I(emer == 0) 0.191 0.060 0.32