linearRegression: linearRegression

Description Usage Arguments Value Examples

View source: R/linearRegression.R

Description

Performs a linear regression analysis on the given formula

Usage

1
linearRegression(form, dat = NULL, subs = NULL)

Arguments

form

an object of class 'formula', or one that can be coerced to that class. ie. a symbolic description of the model to be fitted

dat

an optional data frame containing the data on the model to be fit

subs

an optional vector specifying a subset of data to be used

Value

a list of length 7 containing the coefficients of the model, residuals, fitted values, rank of the fitted model, the residual degrees of freedom, the model formula used, and the model frame used

Examples

1
2
3
linearRegression(dist~speed, cars)
y<-rnorm(100); x<-rnorm(100); linearRegression(y~x, subs=1:50)
linearRegression(mpg~cyl+disp+hp+wt+cyl:disp+disp:wt+cyl:disp:hp, dat=mtcars)

balr411/linearRegression documentation built on Dec. 31, 2020, 7:55 p.m.