Learn R Programming

surveytable (version 0.9.9)

svyciprop_adjusted: Korn and Graubard confidence intervals for proportions, adjusted for degrees of freedom

Description

A version of survey::svyciprop( method = "beta" ) that adjusts for the degrees of freedom.

Usage

svyciprop_adjusted(formula, design, level = 0.95, adj = "none", ...)

Value

The point estimate of the proportion, with the confidence interval as an attribute.

Arguments

formula

see survey::svyciprop().

design

see survey::svyciprop().

level

see survey::svyciprop().

adj

adjustment to the Korn and Graubard confidence intervals: "none" (default), "NCHS", or "NHIS".

...

see survey::svyciprop().

Details

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.

Originally written by Makram Talih in 2019.

Examples

Run this code
set_survey(namcs2019sv)
set_opts(adj = "NCHS")
tab("AGER")
set_opts(adj = "none")

Run the code above in your browser using DataLab