I need the series "lever" from the "leverage" command inside a loop construct in order to perform some hand-made transformation of OLS residuals.

It appears that I need to run the "leverage" command with the --save flag (and the --quiet flag to avoid printing).

This will save in the data base all three series "lever", "influ" and "dffits" produced by the leverage command.

But this is inside a loop. That will run several thousand of times. I certainly do not want to save these three series thousand of times (as is the consequence of the functionality of the leverage command on the matter, quote, <<However, if series of these names already exist, the names of the newly saved series will be adjusted to ensure uniqueness>>).

So I give the "delete" command with the --force flag to persuade gretl to delete series inside the loop.

But I get the message

<<No variables were deleted (some data were in use)>>

I understand that this is likely a technical aspect that exceeds my knowledge.

In practice the "lever" series is used to divide the OLS residuals. The other series are not used for anything.

The delete command is given just before the "endloop" finale.

I know of the solution to NOT use the leverage command and still get my diagonal elements of the hat matrix (in which case the same series will be written over as the loop progresses), but the leverage command is the efficient way to go. So I was wondering,

Any way that can I get gretl to delete the series inside the loop?

--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
scholar:https://g.co/kgs/BqH2YU
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/

Reply via email to