Allin Cottrell schrieb:
On Fri, 12 Mar 2010, Sven Schreiber wrote:
> the following mini-script:
>
> <script>
> open denmark
> ols LRM const LRY IBO IDE
> restrict
> b[LRY]*b[IBO] - 2*b[IDE]*b[LRY] = 0
> end restrict
> </script>
>
> gives (excerpt):
>
>
> ? restrict
> ? b[LRY]*b[IBO] - 2*b[IDE]*b[LRY] = 0
> ? end restrict
> Restriktion:
> b[LRY] - 2*b[IDE] = 0
>
> I have now learned how to formulate nonlinear restrictions, so I know
> the above is wrong, but I still think the
> parsing is problematic. (Should throw an error instead.)
OK, it now does so in CVS.
> Also, I think it's a natural feature request to make the formulation of
> nonlinear restrictions more intuitive. (I know they are a recent
> addition and I'm grateful that it's possible at all, so I'm not saying
> that it's urgent. But I guess I will put it in the feature request
> tracker because of that.)
If you do that, please include a detailed design suggestion.
Well correct me if I'm wrong, but constructing the auxiliary restriction
function which returns a zero matrix under the null hypothesis is purely
algorithmic. So if you have a restriction as in the above example,
b[LRY]*b[IBO] - 2*b[IDE]*b[LRY] = 0
it directly translates into:
matrix h0 = b[1]*b[2]-2*b[3]*b[1]
(well the ordering of the coeffs needs to be taken into account of
course) and the rest is already implemented in gretl. And I think it's
completely ok to require that nonlinear restrictions should be given
with a zero on the right-hand side.
Is this what you had in mind in terms of comment to add in the tracker?
thanks,
sven