Residual Sum of Squares and Hat Matrix
Let have full rank . The least squares estimate of in the Classical Linear Regression Model is given by:
Let denote the fitted values of , where
is called the "hat" matrix. Then the residuals
satisfy and . Also, the
residual sum of squares is:
Hat Matrix
Elements:
when then we are calculating how much weight the observed value has in its own fitted value.
Second row, second column
For SLR
For large sample sizes (>30) values 2 times the average leverage value should be considered large. For small sample sizes values 3 times the average leverage value should be considered large.
Testing Residuals
var()=
approximately where p is the number of parameters (+ slope)
where MSE is calculated without observation
exactly