主要内容

What Is a Linear Regression Model?

A linear regression model describes the relationship between adependent variable,y, and one or moreindependent variables,X. The dependent variable is also called theresponse variable. Independent variables are also calledexplanatoryorpredictor variables. Continuous predictor variables are also calledcovariates, and categorical predictor variables are also calledfactors. The matrixXof observations on predictor variables is usually called thedesign matrix.

A multiple linear regression model is

y i = β 0 + β 1 X i 1 + β 2 X i 2 + + β p X i p + ε i , i = 1 , , n ,

where

  • yiis theith response.

  • βkis thekth coefficient, whereβ0is the constant term in the model. Sometimes, design matrices might include information about the constant term. However,fitlmorstepwiselmby default includes a constant term in the model, so you must not enter a column of 1s into your design matrixX.

  • Xijis theith observation on thejth predictor variable,j= 1, ...,p.

  • εiis theith noise term, that is, random error.

If a model includes only one predictor variable (p= 1), then the model is called a simple linear regression model.

一般来说,一个线性再保险gression model can be a model of the form

y i = β 0 + k = 1 K β k f k ( X i 1 , X i 2 , , X i p ) + ε i , i = 1 , , n ,

wheref(.) is a scalar-valued function of the independent variables,Xijs. The functions,f(X), might be in any form including nonlinear functions or polynomials. The linearity, in the linear regression models, refers to the linearity of the coefficientsβk. That is, the response variable,y, is a linear function of the coefficients,βk.

Some examples of linear models are:

y i = β 0 + β 1 X 1 i + β 2 X 2 i + β 3 X 3 i + ε i y i = β 0 + β 1 X 1 i + β 2 X 2 i + β 3 X 1 i 3 + β 4 X 2 i 2 + ε i y i = β 0 + β 1 X 1 i + β 2 X 2 i + β 3 X 1 i X 2 i + β 4 log X 3 i + ε i

The following, however, are not linear models since they are not linear in the unknown coefficients,βk.

log y i = β 0 + β 1 X 1 i + β 2 X 2 i + ε i y i = β 0 + β 1 X 1 i + 1 β 2 X 2 i + e β 3 X 1 i X 2 i + ε i

The usual assumptions for linear regression models are:

  • The noise terms,εi, are uncorrelated.

  • The noise terms,εi, have independent and identical normal distributions with mean zero and constant variance, σ2. Thus,

    E ( y i ) = E ( k = 0 K β k f k ( X i 1 , X i 2 , , X i p ) + ε i ) = k = 0 K β k f k ( X i 1 , X i 2 , , X i p ) + E ( ε i ) = k = 0 K β k f k ( X i 1 , X i 2 , , X i p )

    and

    V ( y i ) = V ( k = 0 K β k f k ( X i 1 , X i 2 , , X i p ) + ε i ) = V ( ε i ) = σ 2

    So the variance ofyiis the same for all levels ofXij.

  • The responsesyiare uncorrelated.

The fitted linear function is

y ^ i = k = 0 K b k f k ( X i 1 , X i 2 , , X i p ) , i = 1 , , n ,

where y ^ i is the estimated response andbks are the fitted coefficients. The coefficients are estimated so as to minimize the mean squared difference between the prediction vector y ^ and the true response vector y , that is y ^ y . This method is called themethod of least squares. Under the assumptions on the noise terms, these coefficients also maximize the likelihood of the prediction vector.

In a linear regression model of the formy=β1X1+β2X2+ ... +βpXp, the coefficientβkexpresses the impact of a one-unit change in predictor variable,Xj, on the mean of the response E(y), provided that all other variables are held constant. The sign of the coefficient gives the direction of the effect. For example, if the linear model is E(y) = 1.8 – 2.35X1+X2, then –2.35 indicates a 2.35 unit decrease in the mean response with a one-unit increase inX1, givenX2is held constant. If the model is E(y) = 1.1 + 1.5X12+X2, the coefficient ofX12indicates a 1.5 unit increase in the mean ofYwith a one-unit increase inX12given all else held constant. However, in the case of E(y) = 1.1 + 2.1X1+ 1.5X12, it is difficult to interpret the coefficients similarly, since it is not possible to holdX1constant whenX12changes or vice versa.

References

[1] Neter, J., M. H. Kutner, C. J. Nachtsheim, and W. Wasserman.Applied Linear Statistical Models. IRWIN, The McGraw-Hill Companies, Inc., 1996.

[2] Seber, G. A. F.Linear Regression Analysis. Wiley Series in Probability and Mathematical Statistics. John Wiley and Sons, Inc., 1977.

See Also

||

Related Topics