Thank you, Allin. Your example helped me.
In the case that somebody is interested in the function which runs the
Johansen cointegration (TRACE) test recursively, you can have a look
in the attached file. I've taken the the critical values computed by
Pesaran et al ("Structural analysis of vector error correction models
with exogenous I(1) variables") up to 3 weakly exogenous I(1)
variables.
The script still lacks some basic features but should do its job... I
would be happy if somebody wants to add features or improve it.
Best,
Artur
2011/1/19 Allin Cottrell <cottrell(a)wfu.edu>:
On Wed, 19 Jan 2011, artur tarassow wrote:
> I am just writing a function for estimating the test statistics for
> the Johansen cointegration test recursively over time. So I have to
> define a base sample which is taken for the initial estimation and a
> horizon over which to add observations each round.
Sounds like you want something of ths sort:
<script>
function void slide_sample (series y, int max0, int incr, int n)
set messages on # see what's going on more fully
smpl ; max0
loop n
printf "sample mean of y = %g\n", mean(y)
smpl ; +incr
endloop
end function
open denmark.gdt
slide_sample(LRM, obsnum(1984:4), 4, 2)
</script>
In the function slide_sample(), max0 is the initial end-point
of the sample range, incr is the number of observations to
add at each step, and n is the number of steps to take.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users