Why can't I calculate the $R^2$ in some regression models if I use the method of maximum likelihood estimation?

44 Views Asked by At

I've modeled two regression models the first is a multiple linear regression (OLS) $$Y=\beta_0+\beta_1X_1+...+\beta_nX_n+e$$ and I can get its $R^2$. The second model is a spatial autoregressive model (SAR) $$Y=\rho W+\beta_0+\beta_1X_1+...+\beta_nX_n+e$$ where W is the contiguity matrix and $\rho$ is an unknown parameter. This model is estimated by the method of maximum likelihood but I cannot calculate its $R^2$ and rather I have to use the $R^2$ Nalgerkerke. I've found this "There is no direct equivalent to the OLS R-squared, these models are fitted by maximum likelihood." from http://r-sig-geo.2731867.n2.nabble.com/How-to-calculate-squared-R-of-spatial-autoregressive-models-td5762576.html but I'd like to know why I cannot calculate $R^2$ for this model if the formula is just $$R^2=1-\frac{\sum(y_i-\hat{y_i})^2}{\sum(y_i-\overline{y})^2}$$