Description Usage Arguments Examples
View source: R/fit_linear_model.R
This function allows you to fit a (multiple) linear model between dependend and independend variables and perform cross validation. DEPRECATED USE FIT_MODEL2 INSTEAD!!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
df |
data.frame, A data.frame that is used to fit a linear model between dependent and independent variables. |
frml |
formula, A formula object for building the linear model |
family |
string, 'lm' or 'gam' for linear model or generalized additive model, respectively. |
verbose |
logical, if True the R2 of every model fit will be printed. |
... |
further arguments passed on to caret::trainControl (method, number, repeats). Defaults correspond to repeatedcv using 5 folds repeated for 3 times. method = the resampling method: "boot", "boot632", "optimism_boot", "boot_all", "cv", "repeatedcv", "LOOCV", "LGOCV" (for repeated training/test splits), "none" (only fits one model to the entire training set), "oob" (only for random forest, bagged trees, bagged earth, bagged flexible discriminant analysis, or conditional tree forest models), timeslice, "adaptive_cv", "adaptive_boot" or "adaptive_LGOCV" |
plots |
Should scatterplots of the form plot(frml, data = df) be added to the output? |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.