Page 1 of 1

Bai perron residuals

Posted: Mon Nov 21, 2011 7:23 am
by chiade
Hi Tom,

is there a way to get the residuals from bai-perron? i tried putting resids behind the instruction like the one for linreg but nothing came out.

@baiperron(maxbreaks=2,tests) wtic 1997:11:28 2011:06:24 resids
# constant hh bsbc

also, how do i get R square and Durbin watson (DW) figures from DLM?

Thanks again.

Rgds
Des

Re: Bai perron residuals

Posted: Mon Nov 21, 2011 1:40 pm
by TomDoan
chiade wrote:Hi Tom,

is there a way to get the residuals from bai-perron? i tried putting resids behind the instruction like the one for linreg but nothing came out.

@baiperron(maxbreaks=2,tests) wtic 1997:11:28 2011:06:24 resids
# constant hh bsbc
The series %RESIDS has the residuals from the final regression.
chiade wrote:also, how do i get R square and Durbin watson (DW) figures from DLM?

Thanks again.

Rgds
Des
I'd recommend using the @STAMPDiags procedure for diagnostics after a state-space model. Neither the R^2 nor the DW has any particularly interesting properties for a state-space model (R^2 because DLM maximizes the likelihood rather than minimizing the sum of squared residuals, DW because neither the numerator nor denominator is an interesting statistic in the case of a state-space model).

Re: Bai perron residuals

Posted: Tue Nov 22, 2011 6:44 am
by chiade
is it possible to use @stampdiags on linear regressions, bai-perron and other equations?

how do I create the DW and hetereoscedasiticty tests to compare to @stampdiags? or vice versa?

Rgds,
Des