ff_permute | R Documentation |
Permuate explanatory variables to produce multiple output tables for common regression models
ff_permute(
.data,
dependent = NULL,
explanatory_base = NULL,
explanatory_permute = NULL,
multiple_tables = FALSE,
include_base_model = TRUE,
include_full_model = TRUE,
base_on_top = TRUE,
...
)
finalfit_permute(
.data,
dependent = NULL,
explanatory_base = NULL,
explanatory_permute = NULL,
multiple_tables = FALSE,
include_base_model = TRUE,
include_full_model = TRUE,
base_on_top = TRUE,
...
)
.data |
Data frame or tibble. |
dependent |
Character vector of length 1: quoted name of dependent
variable. Can be continuous, a binary factor, or a survival object of form
|
explanatory_base |
Character vector of any length: quoted name(s) of base model explanatory variables. |
explanatory_permute |
Character vector of any length: quoted name(s) of explanatory variables to permute through models. |
multiple_tables |
Logical. Multiple model tables as a list, or a single table including multiple models. |
include_base_model |
Logical. Include model using |
include_full_model |
Logical. Include model using all |
base_on_top |
Logical. Base variables at top of table, or bottom of table. |
... |
Other arguments to |
Returns a list of data frame with the final model table.
explanatory_base = c("age.factor", "sex.factor")
explanatory_permute = c("obstruct.factor", "perfor.factor", "node4.factor")
# Linear regression
colon_s %>%
finalfit_permute("nodes", explanatory_base, explanatory_permute)
# Cox proportional hazards regression
colon_s %>%
finalfit_permute("Surv(time, status)", explanatory_base, explanatory_permute)
# Logistic regression
# colon_s %>%
# finalfit_permute("mort_5yr", explanatory_base, explanatory_permute)
# Logistic regression with random effect (glmer)
# colon_s %>%
# finalfit_permute("mort_5yr", explanatory_base, explanatory_permute,
# random_effect = "hospital")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.