Linear Regression

Bivariate (simple) and multiple regression models.

In MATLAB, the backslash operator can be used, or functions such as polyfit and regress. See here

Bivariate regression (simple linear regression)

Multiple regression

  • This paper has an interesting approach (and references) for using multiple regression in climate trend analysis.


One of the worst pitfalls of multiple regression is in using the technique for multivariate datasets in which some or all of the independent variables are correlated. Collinearity is a VERY common phenomenon in environmental data. In this case, regression coefficients estimated in the model are generally not usable in describing the effect of the independent variables, even though the model may fit the data well. Interpretation of the model coefficients and hypothesis testing becomes difficult or impossible in this situation. Some resources on detecting and dealing with this situation:

  • Detecting collinearity
  • Relationships between independent variables can be assessed with correlation testsor simple linear regression.
  • Dealing with collinearity
  • Remove predictor variables
  • Use principal components (or other ordination axes) as indpendent variables in the model (they are orthogonal).
    • Principal components regression can estimate coefficients for the original independent variables.
  • Partial least squares regression
  • Ridge regression.


  • Time-series multiple regression (see this page) - Values of the dependent and/or independent variables at a previous timestep are incorporated into the model.`