Hello,
I am learning and exploring Gretl's VECM. I have problem with exogeneity test after
imposing restriction in VECM alpha.
Without restriction in VECM alpha, exogeneity test is straightforward as in Gretl
manual's example.
Supposed that we already set restriction in VECM alpha, how to conduct exogeneity test on
other variables?
Using the same approach, I obtain error message "Matrices not conformable for
operation".
I attach the script using Verbeek data.
Thank you.
Yuniarto Hadiwibowo
<script>
open "C:\Program Files\gretl\data\verbeek\money.gdt"
smpl 1954:1 1994:4
vecm 6 2 m infl cpr y tbr --rc --quiet
restrict --full --quiet
b[1,1]=-1
b[1,3]=0
b[2,1]=0
b[2,3]=-1
end restrict
ll0 = $lnl
set echo off
var_1="m"
var_2="infl"
var_3="cpr"
var_4="y"
var_5="tbr"
loop for i=1..5 --quiet
restrict --quiet
a$i=0
end restrict
ts_$i = 2*(ll0 - $rlnl)
end loop
printf "\n\nExogeneity Test\n"
printf "var \t%5s [%6s]\n", "tvalue", "pvalue"
loop for i=1..5 --quiet
printf "%s \t%6.3f [%6.4f]\n", var_$i, ts_$i, pvalue(X, 2, ts_$i)
end loop
printf "\n"
set echo on
restrict --full --quiet
a5=0
end restrict
ll0 = $lnl
set echo off
loop for i=1..4 --quiet
restrict --quiet
a$i=0
end restrict
ts_$i = 2*(ll0 - $rlnl)
end loop
printf "\n\nExogeneity Test\n"
printf "var \t%5s [%6s]\n", "tvalue", "pvalue"
loop for i=1..4 --quiet
printf "%s \t%6.3f [%6.4f]\n", var_$i, ts_$i, pvalue(X, 2, ts_$i)
end loop
</script>