Hi there,

thank you Allin for this helpful showcase!

Cheers
Leon

Am 15.12.2011 03:53, schrieb Allin Cottrell:
On Wed, 14 Dec 2011, Sven Schreiber wrote:

No, non-linear restrictions are not available for system estimators
(yet), AFAIK.

Of course there are workarounds, for example specifying an equivalent
GMM block, where I think it is possible now to test nonlinear
restrictions. But this is admittedly not the most friendly way.
Sven's idea is a good one, and in fact it's not too difficult to 
implement. Since this is quite a nice showcase for gretl's GMM I've 
appended a complete (albeit trivial) example script below.

The first GMM invocation is just to show that the unrestricted VAR 
can be replicated by this method. In the restricted variant, the 
"trick" is to set the length of the parameter vector to the number 
of free parameters, and to calculate the coefficients so as to 
impose the required restriction. The nice thing is that if you 
estimate the restricted model with the --two-step option the 
automatic J-test tests the overidentifying restriction.

One further point: restricted GMM may fail to converge if the 
restriction is too "violent" (too far distant from the unrestricted 
estimates). For example, you can set the "c" parameter below to 1 
and see what happens. In a very informal sense this might be taken 
as "reject the null"!

<hansl>
open data9-7 -q

var 2 UNEMP PRIME
list X = const UNEMP(-1 to -2) PRIME(-1 to -2)

series u1 = $uhat[,1]
series u2 = $uhat[,2]
matrix B1 = $coeff[,1]
matrix B2 = $coeff[,2]

# unrestricted one-step GMM (should replicate the VAR)
gmm
   u1 = UNEMP - lincomb(X, B1)
   u2 = PRIME - lincomb(X, B2)
   orthog u1 ; X
   orthog u2 ; X
   params B1 B2
end gmm

# look at the unrestricted product of two terms
eval B1[5]*B2[5]

# impose nonlinear restriction: B1[5]*B2[5]=c
matrix theta = B1 | B2[1:4]
scalar c = 0.05
gmm
   B1 = theta[1:5]
   B2 = theta[6:9] | {c / theta[5]}
   u1 = UNEMP - lincomb(X, B1)
   u2 = PRIME - lincomb(X, B2)
   orthog u1 ; X
   orthog u2 ; X
   params theta
end gmm --two-step
</hansl>

Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users