R/expand_modelframe.R
expand_modelframe.Rd
Expand covariate values choices and reference values varying one at a time
expand_modelframe(rv, covcol = "covname", ...)
a data.frame with columns names of covariate(s) and values equal reference
column name for the covariate being varied
Arguments to be passed to methods
A data.frame with combination of covariates
reference.values <- data.frame(WT = 85, ALB = 45, SEX = 0)
covcomb <- expand_modelframe(
WT = c(56, 72, 98, 128), # P05, P25, P75, P95 # ref is P50
ALB = c(40, 50), # P05, P95 # ref is P50
SEX = c(1), # Reference is for SEX=0 (female)
rv = reference.values)
covcomb
#> WT ALB SEX covname
#> 1 56 45 0 WT
#> 2 72 45 0 WT
#> 3 98 45 0 WT
#> 4 128 45 0 WT
#> 5 85 40 0 ALB
#> 6 85 50 0 ALB
#> 7 85 45 1 SEX