Page 1 of 1

How to save p-values in Recursive Cointegration test (Johansen)

Posted: Tue Sep 06, 2016 12:53 am
by markjskeenan
Hi

I have recently started using Eviews - and am still very much trying to understand how to do things. I should also perhaps say that I am no expert in econometrics either.

I am interested in saving the p-values (or an equivalent measure of significance) of a Johansen Cointegration Test on a recursive or rolling basis. I found the following code on the forum (and adapted it to make simpler), but am only able to save either the trace statistic or max-Eigen statistic. This is the original post (http://forums.eviews.com/viewtopic.php?t=9124)

How can I also save the rolling p-values for the test as a time series?

This is the code I am using:

'The two series are called P and Q - this bit sets the sample size
smpl 1 554
series _temp=1
!length=@obs(_temp)
delete _temp
!ssize=100
for !i=1 to !length-!ssize+1
smpl @first+!i-1 @first+!i+!ssize-2
'c = option 3 in the Johansen test, 2 refers to the lag, save refers to the matrix
coint(c,2,save=mat2) P Q
'saving trace statistics
series trace=mat2(1,3)
next

Thank you very much in advance for any help on this.

Re: How to save p-values in Recursive Cointegration test (Johansen)

Posted: Tue Sep 06, 2016 8:15 am
by EViews Gareth
You'll have to freeze the output into a table and extract them.

http://forums.eviews.com/viewtopic.php?f=5&t=18

Re: How to save p-values in Recursive Cointegration test (Johansen)

Posted: Wed Sep 07, 2016 6:33 am
by markjskeenan
Thank you very much for your reply - but is that seriously the only solution? Do I then have to manually extract the p-values from each frozen table?

Thanks for your help.

Re: How to save p-values in Recursive Cointegration test (Johansen)

Posted: Wed Sep 07, 2016 7:17 am
by EViews Gareth
Yes