I am taking a course of Econometrics:
I need help to understand as to how do we arrive at the formula for standard error of regression $$\hat{\sigma}^2=\frac{\sum{e_i^2}}{n-k}.$$
I understand the bessel's correction required to remove the bias inherent in sample variance. The proof being available at Bessels Correction Proof of Correctness.
I also found Standard deviation of error in simple linear regression
How to derive the standard error of linear regression coefficient
But I could not find the proof for the above expression (standard error of regression estimate).
I tried to open the equation on the lines of Bessels Correction proof.
$$e_i=\text{Total SS}- \text{Explained SS}$$
Then I try to expand the Explained sum of squares term, but I got stuck at
$$ \sum _{i=1}^n \operatorname {E} \left((\beta\mathbf{ X}-\bar{y} )^2 \right) = \beta^2 E(x^2)-2\beta\bar{xy}+E(\bar{y}^2)$$
I don't know how to proceed. Can anyone please help ?
Then I read this :
The term "standard error" is more often used in the context of a regression model, and you can find it as "the standard error of regression". It is the square root of the sum of squared residuals from the regression - divided sometimes by sample size n (and then it is the maximum likelihood estimator of the standard deviation of the error term), or by $n−k$ ($k$ being the number of regressors), and then it is the ordinary least squares (OLS) estimator of the standard deviation of the error term.
on Standard Error vs. Standard Deviation of Sample Mean
Can anyone suggest a textbook where I can read about these derivations in more details ?