Linear regression with multiple predictor variables

For greater accuracy on low-dimensional through medium-dimensional data
sets, fit a linear regression model using `fitlm`

.

For reduced computation time on high-dimensional data sets, fit a linear
regression model using `fitrlinear`

.

Regression Learner | Train regression models to predict data using supervised machine learning |

`LinearModel` | Linear regression model |

`CompactLinearModel` | Compact linear regression model |

`RegressionLinear` | Linear regression model for high-dimensional data |

`RegressionPartitionedLinear` | Cross-validated linear regression model for high-dimensional data |

Import and prepare data, fit a linear regression model, test and improve its quality, and share the model.

**Interpret Linear Regression Results**

Display and interpret linear regression output statistics.

**Linear Regression with Interaction Effects**

Construct and analyze a linear regression model with interaction effects and interpret the results.

This example shows how to perform linear and stepwise regression analyses using tables.

**Regression with Categorical Covariates**

Perform a regression with categorical covariates using categorical arrays and
`fitlm`

.

**What Is a Linear Regression Model?**

Regression models describe the relationship between a dependent variable and one or more independent variables.

Fit a linear regression model and examine the result.

**Robust Regression — Reduce Outlier Effects**

Fit a robust model that is less sensitive than ordinary least squares to large changes in small parts of the data.

In stepwise regression, predictors are automatically added to or trimmed from a model.

Partial least squares (PLS) constructs new predictor variables as linear combinations of the original predictor variables, while considering the observed response values, leading to a parsimonious model with reliable predictive power.

**Partial Least Squares Regression and Principal Components Regression**

This example shows how to apply Partial Least Squares Regression (PLSR) and Principal Components Regression (PCR), and discusses the effectiveness of the two methods.

Choose a regression function depending on the type of regression problem, and update legacy code using new fitting functions.

**Time Series Regression of Airline Passenger Data**

This example shows how to analyze time series data using Statistics and Machine Learning Toolbox™ features.

Wilkinson notation provides a way to describe regression and repeated measures models without specifying coefficient values.

**Summary of Output and Diagnostic Statistics**

Evaluate a fitted model by using model properties and object functions