linearReg: Linear Regression Model

Description Usage Arguments Value Examples

View source: R/linearReg.R

Description

This function loads in a matrix of explanatory variables and a response vector. The matrix of explanatory variables in converted into a design matrix and the response vector is converted into a column vector.

Usage

1
linearReg(y, X)

Arguments

y
  • numeric response variable vector (dim = 1 x p)

X
  • matrix of explanatory variables included in the model (dim= n x p)

Value

Linear regression model summary including residual quantiles, regression coefficients, standard error, t-statistics, p-values, 95% confidence intervals, R-squared and Adjusted R-squared, and variance inflation factors.

Examples

1
linearReg(as.vector(mtcars["mpg"]),as.matrix(mtcars[c("cyl", "wt")]))

pangoria/linearRegression documentation built on Dec. 22, 2021, 6:39 a.m.