Page 1 of 1

Residuals vs. Standardized Residuals

Posted: Tue Apr 06, 2021 5:36 am
by ac_1
Hi Tom,

As per PRJ https://estima.com/ratshelp/index.html? ... ction.html, to calculate standardized residuals after a LINREG is

Code: Select all

prj(xvx=px)
set stdresids = resids/sqrt(%seesq*(1-px))
graph(style=symbols,vlabel="Standardized Residual")
# stdresids
I can get identical results via

Code: Select all

stats resids
set stdresids_2 = (resids - %mean) / sqrt(%variance)
prin / stdresids stdresids_2
However, sometimes after a BOXJENK, the former PRJ technique results in NA's, whereas the latter doesn't. Why?


Standardized residuals make it easier to view outliers:

(a) Should there be a comparison of both residuals and standardized residuals after a LINREG or BOXJENK via plots: line graph, histogram, acf & pacf, or just the standardized residuals?
(b) Are the standard diagnostic tests after a LINREG e.g. for heteroskedasticity (Breusch-Pagan-Godfrey, White's), autocorrelation (Durbin's H, Breusch-Godfrey), also valid after a BOXJENK, and if not, why not?


Cheers,
Amarjit

Re: Residuals vs. Standardized Residuals

Posted: Tue Apr 06, 2021 10:38 am
by TomDoan
The calculation to which you are referring computes the standard error of projection allowing for the fact that the coefficients are estimated, rather than known. However, it doesn't apply to an ARMA model where the "data" themselves (the lagged residuals on the MA terms) are also subject to error. And in general it doesn't apply to non-linear models where the derivatives with respect to the parameters are evaluated at the estimated parameters.

Note that "standardized" residuals mean different things in different settings. In GARCH models, the residuals are typically standardized by dividing by the square root of the conditional variance---a calculation which is done taking the estimated parameters as fixed.

Re: Residuals vs. Standardized Residuals

Posted: Tue Apr 06, 2021 2:02 pm
by ac_1
Thanks. I can make various plots of the residuals after a BOXJENK e.g. @RegCorrs. How do I standardize the residuals?

Re: Residuals vs. Standardized Residuals

Posted: Wed Apr 07, 2021 9:21 am
by TomDoan
I just explained that that is a calculation which doesn't apply to ARMA models. You can always do a simple standardization by dividing by the standard error of estimate (which is constant over the sample). "Big" residuals will be outside the +/- 2 range when scaled that way.

Re: Residuals vs. Standardized Residuals

Posted: Wed Apr 07, 2021 12:26 pm
by ac_1
Ok, but after demeaning:

Code: Select all

stats %resids
set stdresids = (%resids-%mean)/sqrt(%seesq)
stats stdresids

Re: Residuals vs. Standardized Residuals

Posted: Thu Apr 08, 2021 9:28 am
by TomDoan
diff(standardize) will do that in a single step.