On Sun, 25 Mar 2012, Henrique Andrade wrote:
Em 23 de março de 2012 Allin Cottrell escreveu:
On Fri, 23 Mar 2012, Henrique Andrade wrote:
>
>> Allin, looking further at this situation I found additional
> "misbehaviors"
>> related to the automatic series creation. Please estimate the following
>> model via the GUI:
>>
>> ols PAU const PUS(-1) PAU(-1) --robust
>>
>> You will notice that no series were created.
>
> The two lag series are created. The issue here is just that
> the main window is not being automatically updated to show the
> lags. The workaround is to press "r" (refresh) in the main
> window. Then you see them (under the "twisty") and can delete
> them if you wish.
>
Ok, I tested the new snapshot and now we don`t need to press "r" (refresh)
anymore. But the others inconsistences/problems I pointed are still there:
Let me explain how gretl works at present. It may not be totally
intuitive but it is consistent.
1) If, in a context where a gretl list is wanted (for example, in
specifying the regressors of an OLS model) you use the syntax
"x(-p)" (for "x" a series in the dataset and "p" a valid lag
order)
this is equivalent to saying to gretl: please add a series holding
lag p of x to the dataset; call it "x_p" and put it into the list at
this point.
2) This explains why, if you do (for example)
ols E const E(-1) PUS(-1) PAU(-1)
you then find series named "E_1", "PUS_1" and "PAU_1" in the
dataset, so long as the command is successfully completed.
3) You do not find such series added to the dataset if you do (say)
var 1 E PUS PAU
Why not? Because you did not use the "x(-p)" syntax; rather you used
a command which knows how to handle lags automatically (the "var"
command with lag order 1).
4) After estimating the ad hoc model specified under point 2), the
command "delete E_1" fails, with the message: "No variables were
deleted (some data were in use)" -- why is that?
It's because you are trying to delete a variable that occupies the
position of regressor in the "last model estimated" (even if this
model was not saved by name). The "last model" is the default target
for many commands (diagnostics, "add", "omit", forecasting).
What do you suppose would happen if you (a) estimate a model; (b)
delete from the dataset one or more of the regressors used in this
model; then (c) issue the "add" command, asking gretl to re-estimate
the model with added regressors? It's not going to be pretty!
Bottom line: (a) lagged series should be added to the dataset
(without an explicit command on the user's part) only if you "ask
for them" by using the syntax "x(-p)" in a gretl list context; and
(b) gretl should be quite willing to delete such series unless they
are "in use", either by a model that was explicitly saved or by the
"last model".
Allin Cottrell