View source: R/linear_model_class.R
linear_model | 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_. |
A linear_model
object inherits the following struct
classes:
[linear_model]
>> [model]
>> [struct_class]
R Core Team (2024). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
M = linear_model(
formula = y ~ x,
na_action = "na.omit",
contrasts = list())
D = iris_DatasetExperiment()
M = linear_model(formula = y~Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.