Variables | |||||
---|---|---|---|---|---|
Case | x1 | x2 | … | xp | y |
1 | x1 | x12 | … | x1p | y1 |
2 | x21 | … | x2p | y2 | |
⋮ | |||||
n | xn1 | xn2 | … | xnp | yn |
The multiple regression equation predicts the response variable by a linear relationship with all the explanatory variables:
ˆy=b0+b1x1+b2x2+⋯+bpxp
The coefficients bi in this equation are estimated using the principle of least squares.
The residuals for multiple linear regression are
ei=yi−ˆyi
Always examine the distribution of the residuals and plot them against each of the explanatory variables.
s2=∑e2in−p−1