
Create a Table with Total and Proportion Estimates for Categorical Variables in Structural Survey
Source:R/se_total_prop.R
se_total_prop.Rd
se_total_prop
is a wrapper function for se_total()
and se_prop()
which estimates totals and proportions for categorical variables.
Examples
se_total_prop(
data = nhanes,
interview_lang,
gender,
birth_country,
strata = strata,
weight = weights
)
#> # A tibble: 10 × 12
#> interview_lang gender birth_country occ total ci_total ci_l_total
#> <chr> <chr> <chr> <int> <dbl> <dbl> <dbl>
#> 1 English Female Missing 1 17984. 35248. -17263.
#> 2 English Female Other 704 16271319. 1439977. 14831343.
#> 3 English Female US 3640 134617433. 5472957. 129144476.
#> 4 English Male Other 664 15571104. 1538821. 14032283.
#> 5 English Male US 3575 127077535. 5433656. 121643879.
#> 6 Spanish Female Missing 1 11709. 22949. -11240.
#> 7 Spanish Female Other 464 7643212. 740228. 6902984.
#> 8 Spanish Female US 269 3360788. 415220. 2945569.
#> 9 Spanish Male Other 404 8326198. 889838. 7436360.
#> 10 Spanish Male US 249 3583761. 469708. 3114053.
#> # ℹ 5 more variables: ci_u_total <dbl>, prop <dbl>, ci_prop <dbl>,
#> # ci_l_prop <dbl>, ci_u_prop <dbl>