linear_model {structToolbox} | R Documentation |
Linear models can be used to carry out regression, single stratum analysis of variance and analysis of covariance.
linear_model(formula, na_action = "na.omit", contrasts = list(), ...)
formula |
(formula) A symbolic description of the model to be fitted. |
na_action |
(character) NA action. Allowed values are limited to the following:
The default is |
contrasts |
(list) The contrasts associated with a factor. The default is |
... |
Additional slots and values passed to |
This object makes use of functionality from the following packages:
stats
A linear_model
object with the following output
slots:
lm | (lm) The lm object for this model_. |
coefficients | (numeric) The coefficients for the fitted model_. |
residuals | (numeric) The residuals for the fitted model_. |
fitted_values | (numeric) The fitted values for the data used to train the model_. |
predicted_values | (numeric) The predicted values for new data using the fitted model_. |
r_squared | (numeric) The value of R Squared for the fitted model_. |
adj_r_squared | (numeric) The value ofAdjusted R Squared for the fitted model_. |
R Core Team (2021). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
D = iris_DatasetExperiment() M = linear_model(formula = y~Species)