lm2: lm2

Description Usage Arguments Value Examples

View source: R/lm2.R

Description

Used fit linear regression models

Usage

1
lm2(formula, data, na.action = "omit")

Arguments

formula

An object of class "formula" that models regression to be fit

data

Data frame to perform the linear regression on

na.action

Character input that determines how the regression model should handle missing data. Options include 'omit' (remove rows with NA values), 'fail'(halt regression), or 'impute' (replace NA values with column mean). Defaults to omit if excluded from call.

Value

a list that contains the following values: residuals, rank, fitted.values, df.residual, coefficients, call, model, data.frame, cf, y

Examples

1
2
3
4
lm2(formula = fixed.acidity ~ volatile.acidity + citric.acid * residual.sugar, data = wine)
example <- lm2(formula = quality ~ free.sulfur.dioxide:pH + pH, data = wine)
example$residuals
example$coefficients

gnbosma/hw4 documentation built on March 19, 2021, 1:47 p.m.