On Wed, 25 Jan 2012, Sven Schreiber wrote:
> That's true. And for that reason I'm not proposing to
abolish the
> "$system" dummy-name in relation to the "restrict" command.
Consider
> this example:
>
> <hansl>
> ols y1 0 x1
>
> system
> y1 0 x1
> y2 0 x2
> end system
>
> restrict
> b[1,2] - b[2,2] = 0
> end restrict
> </hansl>
>
> With current CVS this will produce an error, because "restrict" by
> preference looks to the last-estimated model, which in this case is
> single-equation OLS, to which the specified restriction is not
> applicable. (A system has been defined but has not yet been
> estimated, and so does not occupy the place of "last model".) But if
> you substitute
>
> restrict $system
>
> for plain "restrict", the script-fragment above works OK, with the
> restrict command referring to the last-defined system rather than
> the last-estimated model.
Why does this work if no estimation method for the system has been
specified?
That's because "restrict" works differently for "system"
compared with other model commands: in relation to a system,
the restrict block simply sets up a restriction -- it's not
actually tested until you follow up with "estimate", and
that's when the method comes in.
How desirable this is may be debatable, but it's the
long-standing behavior with "system".
In a sense it's a good example for the problems here :-) --
First the argument was that '$system' is redundant and now it's not.
I was really just thinking out loud, looking for comments. The
"$system" dummy-name seems to be redundant in relation to the
"estimate" command, but we're agreeing that it's not (always)
redundant in relation to "restrict". So perhaps we should
continue to require it in both contexts, as confirmation that
the command pertains to the last-defined anonymous system: I
don't have a problem with that.
Allin