On Sat, 12 Mar 2011, Henrique Andrade wrote:
*Y(t) = X(t-1) + e1(t); if z(t-d)>=tau*
*Y(t) = X(t-1) + e2(t); if z(t-d)<tau*
If it's a TVAR I _think_ it should look more like
Y_t = D1 + B1(L)Y_t + I_t*(D2 + B2(L)Y_t) + U_t
where I_t = 1 if z(t-d) >= tau, otherwise 0.
In that case something like the following should do it:
<script>
open australia.gdt
list Y = PAU IAU E
# VAR without any regime-changing
var 1 Y
# make a fake threshold
series z = normal()
scalar tau = 1.5
series r2 = z(-1) >= tau
loop foreach i Y
series r2$i = r2 * $i(-1)
endloop
# VAR with regime changing
var 1 Y ; r2*
</script>
Allin Cottrell