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

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

markjskeenan
Posts: 2
Joined: Sat Sep 03, 2016 7:01 pm

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

Postby markjskeenan » Tue Sep 06, 2016 12:53 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

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

Postby EViews Gareth » Tue Sep 06, 2016 8:15 am

You'll have to freeze the output into a table and extract them.

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

markjskeenan
Posts: 2
Joined: Sat Sep 03, 2016 7:01 pm

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

Postby markjskeenan » Wed Sep 07, 2016 6:33 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

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

Postby EViews Gareth » Wed Sep 07, 2016 7:17 am

Yes


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests