Survey median
svy_median.Rd
Survey median
Usage
svy_median(
design,
vars,
group = NULL,
group_key_sep = " -/- ",
na_rm = TRUE,
vartype = "ci",
level = 0.95,
ak = TRUE,
ak_overall_sep = " @/@ ",
ak_main_sep = " -/- ",
ak_var_to_value_sep = " %/% ",
...
)
Arguments
- design
A srvyr::design object.
- vars
A variable to calculate median from.
- 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.
- 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
).- ak
Boolean. Add the analysis key?
- ak_overall_sep
The overall separator between items, e.g. between the type of analysis and the variables information.
- ak_main_sep
The main separator between variables, e.g. between the two grouping columns.
- ak_var_to_value_sep
The separator between the variable and its value.
- ...
Other parameters to pass to
srvyr::survey_median()
.
See also
Other survey analysis functions:
auto_svy_analysis()
,
svy_analysis()
,
svy_interact()
,
svy_mean()
,
svy_proportion()
,
svy_quantile()
,
svy_ratio()