| Statistics Toolbox | ![]() |
Introduction
Linear models represent the relationship between a continuous response variable and one or more predictor variables (either continuous or categorical) in the form
is a p-by-1 vector of parameters.
is an n-by-1 vector of random disturbances, independent of each other and usually having a normal distribution.
MATLAB uses this general form of the linear model to solve a variety of specific regression and analysis of variance (ANOVA) problems. For example, for polynomial and multiple regression problems, the columns of X are predictor variable values or powers of such values. For one-way, two-way, and higher-way ANOVA models, the columns of X are dummy (or indicator) variables that encode the predictor categories. For analysis of covariance (ANOCOVA) models, X contains values of a continuous predictor and codes for a categorical predictor.
The following sections describe a number of functions for fitting various types of linear models:
See the sections below for a tour of some of the related graphical tools:
| Note See Linear Models for information on fitting nonlinear models. |
| The Bootstrap | One-Way Analysis of Variance (ANOVA) | ![]() |