View source: R/extract_response_strata.R
extract_response_strata | R Documentation |
This function separates the response variable, the strata variable, and the covariates/predictors in a statistical formula.
extract_response_strata(f, covars = FALSE)
f |
|
covars |
|
A list
with strings representing the response variable (response
),
the stratum variable (strata
),
and possibly all explanatory variables (covars
), if covars = TRUE
, as shown
in the formula.
# formula with strata
f <- formula(use ~ exp1 + exp2 + exp1:exp2 + strata(id))
extract_response_strata(f)
extract_response_strata(f, covars = TRUE)
# formula without strata
f2 <- formula(use ~ exp1 + exp2 + exp1:exp2)
extract_response_strata(f2, covars = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.