Description Usage Arguments Value Examples
This is a function to approximately reproduce the coefficients in the linear model object that can be created by 'lm()'. The method being used to compute the OLS estimates is QR decomposition.
1 | linear_model(formula.input, data.input, contrasts.input = NULL)
|
formula.input |
a formula with the legal format. |
data.input |
a dataframe provided by the user. |
contrasts.input |
a list of contrasts of interest (default=NULL). |
a list including the OLS estimates, simulating what will be produced by 'lm()'.
1 2 3 | data(iris)
fit <- linear_model(Sepal.Length ~ ., iris)
fit$coefficients
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.