Get the median for a numeric var
kobo_median.Rd
Get the median for a numeric var
Usage
kobo_median(
design,
vars,
survey,
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 median from.
- survey
The survey sheet from Kobo (with column "type" split). See
impactR.kobo::split_survey()
.- 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
var
be removed? Default to TRUE.- vartype
NULL to report no variability. Otherwise one or more of: standard error ("se", the default), confidence interval ("ci"), variance ("var") or coefficient of variation ("cv").
- level
A single number indicating the confidence level (only one level allowed). Note that this may effect estimated standard errors (see
svyquantile
details onalpha
, which equals1-level
).
Details
survey
should have a split type column with types of variables such as "select_one", "select_multiple", etc.
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_all()
,
kobo_ratio()
,
kobo_select_multiple()
,
kobo_select_multiple_all()
,
kobo_select_one()
,
kobo_select_one_all()