How can I obtained the estimated variance of a linear model when using R, i.e.
\begin{equation} \widehat{var(y)}. \end{equation}
|
How can I obtained the estimated variance of a linear model when using R, i.e. \begin{equation} \widehat{var(y)}. \end{equation} |
||||
|
@Dimitrij's comment is right on, and I didn't previously know about the fitted function, Still, I think that it is helpful to know that the model output includes the fitted values. The content of the model output can be determined using
|
||||
|
|
var(fitted(lm_model))do you need this one? – Dmitrij Celov Jun 28 '11 at 12:10