Re: A wish to save .gretl dataset from a scrip
by Fred Engst
Allin, you are my hero!
I hope it wasn’t too hard to do, just to fulfill my wish.
I tried and it work like a charm!
I can’t thank you enough for this.
Without this, if I discover an error in the model I did, I would have to redo the last part manually for all the students.
Now it is only a click of the button after I made the corrections.
The power of gretl just getting better and better.
Best,
Fred
> Date: Tue, 31 May 2022 19:04:39 -0400
> From: "Cottrell, Allin" <cottrell(a)wfu.edu>
> Subject: [Gretl-users] Re: Helps on a more efficient script without
> loops, plus a wish to save .gretl dataset from a scrip
> To: Gretl list <gretl-users(a)gretlml.univpm.it>
> Message-ID:
> <CA+BOgOBr4CY2UibWAqYcoDoyLYous-J_yi-ZPmhczVnbD1+zaw(a)mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On Mon, May 30, 2022 at 9:19 PM Fred Engst <engst.uibe(a)gmail.com> wrote:
>
>> As you can see, the way I’m using gretl, I need to send my students a .gretl dataset with all the models and perhaps graphs. As is, I need to save each dataset manually, and it is a bit time consuming when there are more than just a few students. I wish I can do this through a script, perhaps using gretlcli to do that, if any of you can suggest a way.
>
> You're talking about a gretl session file, not just a dataset (which
> is easily saved via script using either the GUI program or gretlcli,
> using the "store" command).
>
> Saving a session file via gretlcli is inherently impossible since that
> program has no notion of a "session", no named models or graphs.
> However, saving a session file via the command-line (script or
> console) in the GUI program, while it has not been possible before, is
> now implemented in git and snapshots. You use the "store" command,
> giving the name of the file to be saved the suffix ".gretl", as in
>
> store session01.gretl
>
> Note, though, that you cannot specify a list of series to save (as in
> standard "store" usage) -- or if you do, the effect is to save a gretl
> dataset (in the strict sense). with ".gdt" appended to whatever
> filename was given. There's no provision in session-saving to subset
> the existing series, though of course you can achieve that effect by
> deleting some series before doing the save.
> Here's a trivial example of the new usage:
>
> <hansl>
> open data4-1
> m1 <- ols 1 0 2
> g1 <- gnuplot price sqft
> store mysession.gretl
> </hansl>
>
> Allin
>
> ------------------------------
1 year
Don’t hold back on any suggestion for a more efficient script without loops
by Fred Engst
>
> Date: Tue, 31 May 2022 10:24:53 +0200
> From: Sven Schreiber <svetosch(a)gmx.net>
> Subject: [Gretl-users] Re: Helps on a more efficient script without
> loops, plus a wish to save .gretl dataset from a scrip
> To: gretl-users(a)gretlml.univpm.it
> Message-ID: <e7440826-c42f-a542-8d2a-d5230699d2cc(a)gmx.net>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Am 31.05.2022 um 03:18 schrieb Fred Engst:
>
>> 1) Helps on a more efficient script without loops:
>> Since gretl is not only a great research tool, but also a great teaching tool, I’m trying to extent its usefulness.
>> For my online teaching of econometrics,
>
> OK, first I was tempted to suggest other ways to produce your lists, but
> if your method is working for you, what's actually the problem? Using
> loops is not evil, and I don't think efficiency is really an issue here.
>
> cheers
> sven
>
> —
sven, don’t hold back on any suggestions, please!
Don’t we want to vectorize as much as possible in our coding to make it more compact, in the tradition of one-liner?
Fred
1 year