Follow-up in regard to Jack's nice presentation of the delta
method for testing nonlinear restrictions.
This is not documented yet (nor finalized, if people have good
suggestions for changes) but in CVS we have the following option
for the "restrict" command:
restrict
rfunc = <function-name>
end restrict
That is, you can use the keyword "rfunc" to indicate that you're
giving a constraint function rather than explicit statement of a
restriction. As in Jack's script, this function should take as
its single argument the coefficient vector (in "pointer" form),
and it should return a vector that is zero under H0, non-zero
under the alternative.
At present this is available only for single-equation models.
And the "rfunc" option cannot be combined with restrictions given
in any other form within the same "restrict" block.
Here's an example, in the neighborhood of Arthur T's question,
testing whether two pairs of parameter values have a common ratio:
<script>
function restr (matrix *b)
matrix ret = b[1]/b[2] - b[4]/b[5]
return matrix ret
end function
open data4-10
ols 1 0 2 3 4 5
restrict
rfunc = restr
end restrict
</script>
Allin Cottrell