Hello,
I am using the current cvs on Win XP. I wrote the following script to
obtain the johansen trace pvalue and test statistics recursively:
-----------------------------------
open denmark.gdt
smpl full
list Y = LRM IBO IDE
scalar p = 3 #recursive test for same lag length over all the period
matrix pv_trace = {}
matrix test_trace = {}
smpl 1980:1 1987:3
scalar T = $nobs
smpl 1974:1 1979:1
loop for (i=1; i<=T; i+=1)
coint2 p Y
matrix pval = $pvalue
pval = pval[,1]' #take the first column (Trace) and put it into row i
pv_trace = pv_trace | pval
matrix t = $test
t = t[,1]'
test_trace = test_trace | t
smpl ; +1
endloop
pv <- gnuplot 1 2 3 --with-lines --time-series \
--matrix=pv_trace --output=display --single-yaxis { set title
'Recursive p-value Trace-test'; }
test <- gnuplot 1 2 3 --with-lines --time-series \
--matrix=test_trace --output=display --single-yaxis { set title
'Recursive t-value Trace-test'; }
--------------------------------
Unfortunately I obtain the following error message "Warning: generated
non-finite values" for some reason.
Best wishes,
Artur
Show replies by date