DFUNIT—Dickey-Fuller Unit Root Test

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

DFUNIT—Dickey-Fuller Unit Root Test

Unread post by TomDoan »

dfunit.src is a procedure for doing the Dickey-Fuller unit root test. This includes options for automatic lag length selection, with options similar to the ones that we've used in other procedures. @DFUNIT is part of the Unit Root Tests wizard on the Time Series menu.

Detailed description
yangdashan
Posts: 8
Joined: Sun Aug 25, 2019 11:59 am

How may I get the residual after ADF test

Unread post by yangdashan »

Dear sir or madam,

One little question.

In our school class, it is requested to ensure the residual after the ADF process to be of non autocorrelation, but it was performed by other software then.

Sine it is achieved by the procedure, dfunit, and only get the result of ADF, I'm not sure where I can access the residuals to have a test on that.

Thanks a lot
Bill
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: How may I get the residual after ADF test

Unread post by TomDoan »

%RESIDS has the residuals from the final test regression.
yangdashan
Posts: 8
Joined: Sun Aug 25, 2019 11:59 am

Re: How may I get the residual after ADF test

Unread post by yangdashan »

TomDoan wrote:%RESIDS has the residuals from the final test regression.
Dear Tom,

Yes, I had the impression of %RESIDS but last time I used
set res=%RESIDS or compute res=%RESIDS then print res, they all inevitably did not work and this time I use directly
CORRELATE(QSTATS,SPAN=1,NUMBER=20) %RESIDS and it gets to work.

May I ask one more question that how to exam the eigenvalues all lie inside the unit circle after the VAR(independent and with GARCH)? I checked the forum and UG but seemingly did't find that. Thank you.

Best wishes,
Bill
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DFUNIT—Dickey-Fuller Unit Root Test

Unread post by TomDoan »

It would be

set res = %resids

not COMPUTE. (SET is for entire series). You can do either

disp res

(which will do the whole series)

or

print / res

(you need the /---perhaps you didn't include that). PRINT is a more complicated instruction since it lets you select a range and format.

%MODELLARGESTROOT(mdl) gives the largest root, which is generally all you need. If you really want all the eigenvalues (there are a lot of them!!) you have to get the companion matrix (%MODELCOMPANION function) and use the EIGEN instruction. Note that there will typically be a fair number of complex eigenvalues, so you need to get the complex versions of the eigen values (CVALUES option on EIGEN). See https://estima.com/forum/viewtopic.php?p=726.


Last bumped by TomDoan on Mon Mar 07, 2022 6:15 pm.
Post Reply