
Get the proportion of the interaction of variables
kobo_interact.Rd
A wrapper around svy_interact()
to get the proportion of the interaction of variables, and using the Kobo tool to get labels.
Usage
kobo_interact(
design,
vars,
interact_key_sep = " -/- ",
survey,
choices = NULL,
group = NULL,
group_key_sep = " -/- ",
label_survey = TRUE,
na_rm = TRUE,
vartype = "ci",
level = 0.95
)
Arguments
- design
A srvyr::design object.
- vars
Variables to calculate proportion from.
- interact_key_sep
A character string to separate interactions columns in a fancy 'interact_key" column.
- survey
The survey sheet from Kobo (with column "type" split). See
split_survey()
.- choices
The choices sheet from Kobo. If not NULL, the function tries to retrieve labels.
- group
A quoted vector of columns to group by. Default to NULL for no group.
- group_key_sep
A character string to separate grouping column names in a fancy 'group_key' column.
- label_survey
Boolean. Retrieve var's label from the survey sheet? Default to TRUE.
- na_rm
Should NAs from
interact
be removed? Default to TRUE.- vartype
Report variability as one or more of: standard error ("se", default), confidence interval ("ci"), variance ("var") or coefficient of variation ("cv").
- level
(For vartype = "ci" only) A single number or vector of numbers indicating the confidence level