A version of survey::svyciprop( method = "beta" ) that adjusts for the degrees of freedom.
svyciprop_adjusted(
formula,
design,
level = 0.95,
adj = "none",
aa_vr = NULL,
aa_pop = NULL,
...
)The point estimate of the proportion, with the confidence interval as an attribute.
see survey::svyciprop().
see survey::svyciprop().
see survey::svyciprop().
adjustment to the Korn and Graubard confidence intervals: "none" (default),
"NCHS", or "NHIS".
used to produce age-adjusted confidence intervals only. The name of a
categorical age variable located in design.
used to produce age-adjusted confidence intervals only. A data.frame
with columns named Level and Population. Level must exactly match the levels
of aa_vr. Population is the population count or proportion/weight for
that level of aa_vr.
see survey::svyciprop().
adj specifies the adjustment to the Korn and Graubard confidence intervals.
"none": No adjustment is performed. Produces standard Korn and Graubard confidence intervals,
same as survey::svyciprop( method = "beta" ).
"NCHS": Adjustment that might be required by some (though not all) NCHS data systems. With
this adjustment, the degrees of freedom is set to degf(design). Consult the documentation
for the data system that you are analyzing to determine if this is the appropriate
adjustment.
"NHIS": Adjustment that might be required by NHIS. With this adjustment, the degrees
of freedom is set to nrow(design) - 1. Consult the documentation
for the data system that you are analyzing to determine if this is the appropriate
adjustment.
To use these adjustments in surveytable tabulations, call set_survey() or set_opts() with the
appropriate mode or adj argument. Age-adjustment can be turned on with set_survey(). But if
adj = "none", no age-adjustment is performed.
For age-adjustment, aa_pop$Population can contain either population counts
or proportions/weights for each level. Values are normalized internally, so
counts and proportions produce the same confidence intervals when they
describe the same standard population distribution.
Originally written by Makram Talih (2019). Age-adjusted calculation based on Natalie Young (2026).
set_survey(namcs2019sv)
set_opts(adj = "NCHS")
tab("AGER")
set_opts(adj = "none")
Run the code above in your browser using DataLab