Get the proportion for a select_multiple
kobo_select_multiple.Rd
Get the proportion for a select_multiple
Usage
kobo_select_multiple(
design,
vars,
survey,
choices = NULL,
choices_sep = "/",
group = NULL,
group_key_sep = " -/- ",
label_survey = TRUE,
label_choices = TRUE,
na_rm = TRUE,
vartype = "ci",
level = 0.95
)
Arguments
- design
A srvyr::design object.
- vars
A qupted variable to calculate proportion from.
- survey
The survey sheet from Kobo (with column "type" split). See
split_survey()
.- choices
The choices sheet from Kobo.
- choices_sep
Select multiples choices separator.
- 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.
- label_choices
Boolean. Retrieve choices label from the choices sheet? Default to TRUE.
- na_rm
Should NAs from
var
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
Details
survey
should have a split type column with types of variables such as "select_one", "select_multiple", etc.
Not removing missing values
The rationale when not removing missing values is the following:
Missing values for each dummy 1/0 column corresponding to response option are recoded to 0
Then, the mean of 0s and 1s is computed, thus the % for all response options
This allows to calculate the % for each choice over the whole dataset.
See also
Other functions for analyzing from Kobo tool:
auto_kobo_analysis()
,
kobo_analysis()
,
kobo_analysis_from_dap()
,
kobo_mean()
,
kobo_mean_all()
,
kobo_median()
,
kobo_median_all()
,
kobo_ratio()
,
kobo_select_multiple_all()
,
kobo_select_one()
,
kobo_select_one_all()