multreg: Multiple Linear Regression

View source: R/multreg.R

multregR Documentation

Multiple Linear Regression

Description

This function allows you to find a multiple linear regression model with several variables, or a categorical predictor with multiple levels.

Usage

multreg()

Examples

> x = c(1,2,3,4,5,6,7)
> y = c(2.5,5.1,6.4,8.4,10.8,13.4,15.3)
> linreg()
What is the name of the list with your x variable?
  x
What is the name of the list with your y variable?
  y
The best fit line for these data is:
  y = 2.12142857142857 x (x) + 0.357142857142856


You can plot these data by typing:
  plot(x,y)

You can find the best fit line by typing:
  lm(y~x)

You can add the best fit line to the plot by saving the model:
  model = lm(y~x)

and then adding it to the plot:
  abline(model)

jrpriceUPS/Math160UPS documentation built on April 28, 2024, 12:41 p.m.