Page 1 of 1

Near singular matrix - D-F

Posted: Tue Nov 13, 2018 5:13 pm
by Facundo
Hi,

I simulate an AR(1) time series with coefficient "1.2". Then when I run the Dickey Fuller test, I get "Near singular matrix" message. I suppose that it has to be with Ho (coefficient=0) and H1 (coefficient < 1), but I can't explain it.

Thanks in advance

Re: Near singular matrix - D-F

Posted: Tue Nov 13, 2018 8:03 pm
by startz
You might want to post your workfile and exact commands.

Re: Near singular matrix - D-F

Posted: Tue Nov 13, 2018 8:43 pm
by Facundo
I found that the problem is the maximum lag length to consider when performing automatic lag length selection. If I set it on '0', there is no problem; if it is higher, I get the message.
Here is the code. Thanks

Code: Select all

'Workfile new workfile ejercicios q 1951:01 2000:04 'White noise series e=nrnd 'TS-simulation smpl 1951:01 1951:01 series y1=0 smpl 1951:02 1951:02 smpl 1951:02 @last series y1= 2*y1(-1) + e smpl @all 'Unit Root Test - ADF y1.uroot(adf, const, trend, maxlag=0) 'maxlag=0, OK y1.uroot(adf, const, trend, maxlag=1) 'maxlag=0, near singular matrix

Re: Near singular matrix - D-F

Posted: Tue Nov 13, 2018 9:15 pm
by startz
I believe you're getting numerical problems. Note that the final values of y1 are around 10^60

Re: Near singular matrix - D-F

Posted: Wed Nov 14, 2018 6:09 am
by Facundo
Thanks, it worked with less observations.