simple_binary_tab: Create a table estimating the percentage of "yes" replies to...

Description Usage Arguments Value Examples

View source: R/mean_tables.R

Description

Create a table estimating the percentage of "yes" replies to a yes/no survey question and the margin of error

Usage

1
2
simple_binary_tab(dat, binary_outcome, na.rm = T, ci_level = 0.95,
  vartype = NULL)

Arguments

dat

A tbl_svy object created using the srvyr package

binary_outcome

The name of an outcome variable in dat. No quotes needed.

na.rm

A logical indicating whether to drop NAs from the outcome.

ci_level

A numeric indicating the confidence level. Default it 0.95

vartype

A string indicting how to display the variance. See srvyr::survey_mean(). "ci" is preferable.

Value

tibble with up to three numeric columns showing point estimate, and uncertainty (e.g., variance or upper and lower bounds of a confidence interval)

Examples

1
2
3
4
5

mattysimonson/exploratorium documentation built on Dec. 21, 2021, 3:49 p.m.