Kobo survey analysis
kobo_analysis.Rd
Kobo survey analysis
Usage
kobo_analysis(
design,
analysis,
vars,
survey,
choices = NULL,
group = NULL,
group_key_sep = " -/- ",
auto_group_remove = TRUE,
label_survey = TRUE,
label_choices = TRUE,
na_rm = TRUE,
vartype = "ci",
level = 0.95,
ratio_key_sep = " -/- ",
choices_sep = "/"
)
Arguments
- design
A srvyr::design object.
- analysis
Analysis type. See details for more, well, details.
- vars
A variable to calculate from.
- survey
The survey sheet from Kobo (with column "type" split). See
split_survey()
.- choices
The choices sheet from Kobo.
- 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.
- auto_group_remove
If TRUE, the analysis won't be run for vars that are in group. Default to TRUE.
- 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
- ratio_key_sep
A separator for the ratio key.
- choices_sep
Select multiples choices separator.
Specificity per type of analysis
The possible analysis type are: mean for kobo_mean()
, median for kobo_median()
, select_one for kobo_select_one()
, select_multiple for kobo_select_multiple()
, or ratio for kobo_ratio()
.
If
analysis
is "ratio":vars
takes a named vector. Names will be passed tonums
insvy_ratio()
and values todenoms
.If choices not NULL, the function tries to retrieve labels for select_one, while it is mandatory for select_multiple, and not used for mean, median, and ratio.
See also
Other functions for analyzing from Kobo tool:
auto_kobo_analysis()
,
kobo_analysis_from_dap()
,
kobo_mean()
,
kobo_mean_all()
,
kobo_median()
,
kobo_median_all()
,
kobo_ratio()
,
kobo_select_multiple()
,
kobo_select_multiple_all()
,
kobo_select_one()
,
kobo_select_one_all()