lin_model: Linear regression model

Description Usage Arguments Value Examples

View source: R/regSel_code.R

Description

Performs linear regression using Ordinary Least Squares (or Weighted Least Squares when weights are specified)

Usage

1

Arguments

formula

Model formula using specified columns of DataFrame 'data'. Can include interactions and select no intercept with -1

data

Dataframe from which model variables are pulled.

weights

Vector of weights to be used in Weighted Least Squares regression estimates. Default = NULL.

Value

List containing the following elements

Examples

1
2
3
4
5
6
7
8
 x = rnorm(10)
x2 = rnorm(10)
y = rnorm(10)
df = data.frame(y,x,x2)

lin_model(formula = y~x*x2, data = df, weights = 1:10)

lin_model(formula = y~1, data = df)

EvanWie/regSel documentation built on Nov. 26, 2019, 2:11 a.m.