Search This Blog

Tuesday, March 5, 2019

Multiple linear regression in the R software environment

Carrying out multiple linear regression (MLR) in the freely available R software environment is not very different from performing simple linear regression (SLR) in R. The same basic steps can be followed when working on a MLR problem:
  1. Structure your data in a data frame, for example, via import from a CSV file.
  2. Derive the linear model by using the lm() function.
  3. Review the results displayed with the summary() function.
The derived model can then be applied to estimate new values for the dependent variable (response values) by calling the predict() function, which needs to receive a data frame object with new values for the independent variables.

Data and code to get started with MLR in R:


CSV file with sample dataset at
www.axeleratio.com/math/comp/linreg/csv/woodward82.csv.

Tutorial-style document with title “How to perform multiple linear regression analysis with R” at
www.axeleratio.com/math/comp/linreg/multilinreg.pdf.

MLR in R using the woodward82.csv dataset as explained in the articleHow to perform multiple linear regression analysis

No comments:

Post a Comment