linear_model {structToolbox}R Documentation

Linear model

Description

Linear models can be used to carry out regression, single stratum analysis of variance and analysis of covariance.

Usage

linear_model(formula, na_action = "na.omit", contrasts = list(), ...)

Arguments

formula

(formula) A symbolic description of the model to be fitted.

na_action

(character) NA action. Allowed values are limited to the following:

  • "na.omit": Incomplete cases are removed.

  • "na.fail": An error is thrown if NA are present.

  • "na.exclude": Incomplete cases are removed, and the output result is padded to the correct size using NA.

  • "na.pass": Does not apply a linear model if NA are present.

The default is "na.omit".

contrasts

(list) The contrasts associated with a factor. The default is list.

...

Additional slots and values passed to struct_class.

Details

This object makes use of functionality from the following packages:

Value

A linear_model object.

References

R Core Team (2020). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.

Examples

D = iris_DatasetExperiment()
M = linear_model(formula = y~Species)


[Package structToolbox version 1.2.0 Index]