Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Linear regression with multiple predictor variables

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

.

For reduced computation time on high-dimensional data sets that
fit in the MATLAB^{®} Workspace, fit a linear regression model using `fitrlinear`

.

`LinearModel` |
Linear regression model class |

`CompactLinearModel` |
Compact linear regression model class |

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

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

`fitlm` |
Create linear regression model |

`stepwiselm` |
Create linear regression model using stepwise regression |

`compact` |
Compact linear regression model |

`disp` |
Display linear regression model |

`feval` |
Evaluate linear regression model prediction |

`predict` |
Predict response of linear regression model |

`random` |
Simulate responses for linear regression model |

`plot` |
Scatter plot or added variable plot of linear model |

`plotAdjustedResponse` |
Adjusted response plot for linear regression model |

`fitrlinear` |
Fit linear regression model to high-dimensional data |

`predict` |
Predict response of linear regression model |

`dummyvar` |
Create dummy variables |

`invpred` |
Inverse prediction |

`plsregress` |
Partial least-squares regression |

`x2fx` |
Convert predictor matrix to design matrix |

`relieff` |
Importance of attributes (predictors) using ReliefF algorithm |

`regress` |
Multiple linear regression |

`robustdemo` |
Interactive robust regression |

`robustfit` |
Robust regression |

`rsmdemo` |
Interactive response surface demonstration |

`rstool` |
Interactive response surface modeling |

Fit a linear regression model and examine the result.

**Interpret Linear Regression Results**

Display and interpret linear regression output statistics.

Import and prepare data, fit a regression, test and improve its quality, and share it.

**Regression with Categorical Covariates**

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

.

**Regression Using Dataset Arrays**

Perform linear and stepwise regression analyses using dataset arrays.

**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.

**Parametric Regression Analysis**

Choose a regression function, and update legacy code using new fitting functions.

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.

**What Are Linear Regression Models?**

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

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

Was this topic helpful?