View source: R/cross_fit_robust.R
cross_fit_robust | R Documentation |
Cross fit robust linear models
cross_fit_robust( data, formulas, cols = NULL, weights = NULL, clusters = NULL, fn_args = list(), tidy = tidy_glance, tidy_args = list(), errors = c("stop", "warn") )
data |
A data frame |
formulas |
A list of formulas to apply to each subset of the data.
If named, these names will be used in the |
cols |
Columns to subset the data.
Can be any expression supported by
< |
weights |
A list of columns passed to |
clusters |
A list of columns passed to |
fn_args |
A list of additional arguments to |
tidy |
A logical or function to use to tidy model output into
data.frame columns.
If |
tidy_args |
A list of additional arguments to the |
errors |
If |
A tibble with a column for the model formula,
columns for subsets,
columns for the weights and clusters (if applicable),
and columns of tidy model output or a list column of models
(if tidy = FALSE
)
cross_fit()
to use any modeling function.
cross_fit_robust(mtcars, mpg ~ wt, cyl, clusters = list(NULL, am))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.