Complex survey version of create_qgroups
. Relies heavily on the
survey package [1,2].
create_qgroups_svy(x, groups = 4, probs = seq(1/groups, 1 - 1/groups,
1/groups), strata = NULL, design, svyquantile_list = list(na.rm =
TRUE), cut_list = list(include.lowest = TRUE))
Numeric vector.
Numeric value, e.g. 3 for tertiles, 4 for quartiles, etc.
Numeric vector.
Factor specifying subgroups to calculate quantiles within. For
multivariable subgroups, you can use interaction
.
Survey design object.
Arguments to pass to
svyquantile
.
Arguments to pass to cut
.
Factor variable.
1. Therneau, T. (2015). A Package for Survival Analysis in S. R package version 2.38. https://cran.r-project.org/package=survival.
2. Therneau, T.M. and Grambsch, P.M. (2000). Modeling Survival Data: Extending the Cox Model. Springer, New York. ISBN 0-387-98784-3.