Survey ratio
svy_ratio.Rd
Survey ratio
Usage
svy_ratio(
design,
nums,
denoms,
ratio_key_sep = " -/- ",
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.
- nums
The numerator variables.
- denoms
The denominator variables.
- ratio_key_sep
A separator for the ratio key.
- 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
Boolean. Remove any line that as an NA in
num
ordenom
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
A single number or vector of numbers indicating the confidence 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.
- ...
Parameters to pass to
srvyr::survey_ratio()
.
See also
Other survey analysis functions:
auto_svy_analysis()
,
svy_analysis()
,
svy_interact()
,
svy_mean()
,
svy_median()
,
svy_proportion()
,
svy_quantile()