On Fri, 18 Sep 2009, Talha Yalta wrote:
> I agree it's not ideal, ...
I think it is far from being ideal. My understanding of the concept of
a session based work model is one where the users are able to estimate
different models and later revisit them and to all sorts of
comparisons and tests. There is little advantage of saving a model if
the user will not be able to perform any tests, draw and graphs or
save the fitted values etc.
Currently, what gretl wants is the user to manually return back to the
original subsample before performing such operations but this may not
be even possibe as in the case of models based on a random subsample.
Plus, I notice that the "Modify Model..." function under the Edit menu
is not affected by this behavior. So if one open a model, say using
the full range, and if the data is currently subsampled, after
modifying the model by adding or subtracting various variables, what
he gets will be a model based on a different subsample.
I'll come back to that point below.
The current situation can also be annoying because, OK, say I opened
a
model using a different subsample and tried to run a test. Gretl
warns me that the model is subsampled differently and makes the Tests
and Graphs menu ghosted. (Why are not the menus ghosted as soon as I
open the model window is a different question here.) ...
And here's the answer: because we don't know, at the time when the
model window is opened, what the sample will be when you actually
click on the relevant menu items. Part of the "non-linearity" of
a point-and-click session (convenient, up to a point, for the user
but quite tiresome for the programmer) is that the sample can be
changed while a model is displayed.
So I go ahead and manually adjust the subsample but what happens
now is that those menus are still ghosted so I need to first
close the window and reopen it just because they will not be
ghosted anymore.
If you get the matching subsample right the menus will become
active again. E.g.
open data4-1
restrict the sample using "bedrms=4"
run an OLS
display the model
restore the full sample range
try the menus in the model window: some items are inactive
again restrict the sample using "bedrms=4"
revisit the model menus: now they're all active
In conclusion, I have a suggestion: Could you please make it
such that whenever a model is saved as an icon, gretl internally
saves the observation numbers of the subsample as a vector?
We've always done that: that's how we can tell whether or not the
current sample differs from the one on which the model is based.
This will make it possible that when the user opens a saved
model or activates an open model window, gretl first checks
whether the current subsample matches with those of the model
and opens up a dialog box asking if the user wants to return to
the subsample used by the model. If the user say "yes" the
subsample is automatically adjusted. If the user says "no," then
the Tests and Graphs menus are diasabled along with the "Modify
model" option.
That's one way of handling the issue. What is now (newly)
implemented in CVS/snapshot is that most tests/graphs are enabled
regardless: if need be, we recreate the model's dataset on the fly
and do the tests/graphs using that. (This facility may still have
some rough edges.)
However, there are a couple of things that can't be handled in
that way, notably forecasts and saving series (e.g. residuals) to
the dataset. So having an option to restore the model's sample as
the current sample might be a good addition.
As for the "Modify model" item, I'm not sure there's any definite
"right behavior", in relation to the sample. But having the
option you mention might take care of that.
Allin.