How to save p-values in Recursive Cointegration test (Johansen)
Posted: 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.
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.