Thanks to Jack for shaking things up on this point.
In current CVS, the English help file contains a more accurate
description than hitherto of what the "omit" command actually
does. It's a bit convoluted. I'll try to summarize more
critically here.
(1) "Traditionally", the default behaviour of "omit" was to
estimate the restricted model (that is, the source model minus
the independent variables selected for omission), and to push
this restricted model onto the stack as the "last model
estimated". In the process, if the source model was estimated
using OLS, we calculated the F-test for the joint significance
of the omitted variables, using the restricted and unrestricted
SSRs and their respective degrees of freedom,
(2) Some time ago, it occurred to me that this was a bit weak
with regard to models estimated via methods other than OLS (no
test statistic was provided); furthermore, it was problematic
with regard to models estimated via OLS but calling for "robust
standard errors" (an innovation relative to old-style gretl).
(3) I therefore modified the behavior of "omit" so that
(i) if the original model used OLS with "robust standard
errors", we formulated a Wald-type statistic using the robust
covariance matrix from the original model, in F-form, and
(ii) if the original estimator was something other than OLS, we
used a Wald test (chi-square form) based on the covariance
matrix for the original model.
Modifications (i) and (ii) enabled us to present a test
statistic for the joint significance of the omitted variables in
cases where we'd previously skipped the reporting of such a
statistic. However, I maintained the old behaviour of
estimating (and "returning") the restricted model, even if that
model was not used in computing the test statistic for the
omitted variables.
Jack is now pointing out that in some cases we really don't want
to base our test statistic on explicit estimation of the
restricted model -- even if that method is valid "in principle",
we'd rather just use the Wald method on the original covariance
matrix. I agree.
Here's the question I'm working towards: Do you think we'd be
better off if we changed the behaviour of the "omit" command so
that it calculates and reports a test statistic -- possibly by
means of estimating the restricted model, depending on the
original estimator and relevant option switches -- but never
replaces the "current model" with a restricted model?
In practical scripting terms:
ols 1 0 2 3 4 5
omit 4 5
omit 4 5
Currently, the third line above is an error: you can't omit vars
4 and 5 because they're already omitted: by this time the
"current model" has spec "ols 1 0 2 3".
In the possible new-style behaviour, line 3 would not be an
error, it would simply repeat the test done on line 2.
In current CVS, line 3 would _not_ be an error if we used the
"--wald" option flag, which suppresses estimation of the
restricted model. That is,
ols 1 0 2 3 4 5
omit 4 5 --wald
omit 4 5 --wald
would be valid, if repititious.
Allin.