Hi, it wasn't clear to me how to save to a file and print to the console at the same time, but you're right I didn't focus enogh, I worked around it with eval readfile("logit_summary.txt")

Thanks.


De: Artur Tarassow <atecon@posteo.de>
Enviado: miércoles, 7 de abril de 2021 17:29
Para: gretl-users@gretlml.univpm.it <gretl-users@gretlml.univpm.it>
Asunto: [Gretl-users] Re: Storing model output summary
 
Hi,

have you seen the command reference on this? Looks pretty clear to me
what to do.

http://gretl.sourceforge.net/gretl-help/cmdref.html#outfile

Best,
Artur


Am 07.04.21 um 19:12 schrieb Iago Varela:
> Hi, I've tried the following
>
> 1)
>
>     # Running our logit model
>     string logit_summary = ""
>     outfile logit_summary.txt --buffer=logit_summary # Writing logit
> output into string var
>         logit model_dependent model_regressors --p-values
>     end outfile
>     print logit_summary
>
> 2)
>
>     # Running our logit model
>     string logit_summary = ""
>     outfile --buffer=logit_summary # Writing logit output into string var
>         logit model_dependent model_regressors --p-values
>     end outfile
>     print logit_summary
>     store model_summary.txt logit_summary
>
>
> Neither of two produce a file, although I can print the result in the
> second one.
>
> ------------------------------------------------------------------------
> *De:* Allin Cottrell <cottrell@wfu.edu>
> *Enviado:* miércoles, 7 de abril de 2021 13:16
> *Para:* Gretl list <gretl-users@gretlml.univpm.it>
> *Asunto:* [Gretl-users] Re: Storing model output summary
> On Wed, 7 Apr 2021, Iago Varela wrote:
>
> > Sorry, I forgot to mention that I was making a script, this one in
> > particular: https://gitlab.com/iagovar/gretl-logit-test
> <https://gitlab.com/iagovar/gretl-logit-test>
> >
> > I was just looking for a way to automatically export the logit
> > summary to a txt.
>
> Then try the "outfile" command:
>
> outfile mymodel.txt
> logit ...
> end outfile
>
> Allin
> _______________________________________________
> Gretl-users mailing list -- gretl-users@gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
> Website:
> https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
> <https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/>
>
> _______________________________________________
> Gretl-users mailing list -- gretl-users@gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
> Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/