create_qgroups_svy {dvmisc} | R Documentation |
Create Quantile Groups (Complex Survey Data)
Description
Complex survey version of create_qgroups
. Relies heavily on the
survey package [1,2].
Usage
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))
Arguments
x |
Numeric vector. |
groups |
Numeric value, e.g. 3 for tertiles, 4 for quartiles, etc. |
probs |
Numeric vector. |
strata |
Factor specifying subgroups to calculate quantiles within. For
multivariable subgroups, you can use |
design |
Survey design object. |
svyquantile_list |
Arguments to pass to
|
cut_list |
Arguments to pass to |
Value
Factor variable.
References
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.
[Package dvmisc version 1.1.4 Index]