I am running a simulation in which I generate 100 copies of 3 time
series. I want to write a script that will run cointegration tests on
them and store all the p-values. I can easily do this for the
Engel-Granger test for cointegration using $pvalue, for example the
contents of the for loop look something like
coint 4 v1 v2 v3 --ct
genr pval=$pvalue
I would like to do much the same thing, but with the Johansen test,
storing the p-values from the Lmax (or trace) test (so there would be
3 p-values for each simulation). Running the test is easy with
coint2 4 v1 v2 v3
but is there any way that I can get the p-values for the Lmax test out
of this automatically? Running $pvalue just outputs the p-value from
whatever the last test run before this was. Is this possible?
Show replies by date