On 10/04/14 16:14, valentina colombo wrote: > Dera gretl users, > I had estimate my SVAR model and I need to export the estimated > coefficients (bootdata) to excel or csv file. I have tried to use the > following command but it is storing my variables but not bootdata > (from a SVAR). > store /home/valentina/bootdata.csv bootdata > ! gnumeric /home/valentina/bootdata.csv > Any suggestion? I cannot go on with my estimation!! > Thanks > Valentina >
For this type of things I use a combination of 'outfile' and 'printf' commands. An example is below. The lines from 'open' to 'var' command are taken from gretl example sw_ch14.in. The result is the file "coefficients.csv" in your current gretl working directory. <hansl> open sw_ch14.gdt # set the robust std errors variant used by S and W set force_hc on set hc_version 1 genr infl = 400 * log(PUNEW/PUNEW(-1)) diff infl lags d_infl LHUR smpl 1962:1 1999:4 # run "automatic" VAR, (see equations 14.5 and 14.6) in Stock and Watson, # "Introduction to Econometrics", chapter 14 var 4 d_infl LHUR const -r ########## set messages off set echo off matrix B=$coeff scalar ncoefs=rows(B) outfile coefficients.csv --write loop i=1..ncoefs --quiet printf "%.4f, %.4f\n ", B[i,1], B[i,2] endloop outfile --close </hansl> -- Firma Arista *Ignacio Díaz-Emparanza* Zuzendaria/Director ignacio.diaz-emparanza(a)ehu.es <mailto:ignacio.diaz.emparanza(a)ehu.es> 94 6013732 *EKONOMIA APLIKATUA III SAILA (EKONOMETRIA ETA ESTATISTIKA)/ DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA) UPV/EHU* Avda. Lehendakari Aguirre, 83 | 48015 BILBAO *T.: +34 946013740* | *F.: +34 946013754* *www.ea3.ehu.es* <http://www.ea3.ehu.es> ERNE! Baliteke mezu honen zatiren bat edo mezu osoa legez babestuta egotea. Mezuak badu bere hartzailea. Okerreko helbidera heldu bada (helbidea gaizki idatzi, transmisioak huts egin) eman abisu igorleari, korreo honi erantzunda. Kontuz! Mezua ez bada zuretzat, ez erabili, ez zabaldu beste inori, ez kopiatu eta ez baliatu. ¡ATENCIÓN! Este mensaje contiene información privilegiada o confidencial a la que sólo tiene derecho a acceder el destinatario. Si usted lo recibe por error le agradeceríamos que no hiciera uso de la información y que se pusiese en contacto con el remitente. E-mail hau inprimatu baino lehen egiaztatu inprimatzeko beharra. Antes de imprimir este e-mail piense bien si es necesario hacerlo.Title: Firma Arista
On 10/04/14 16:14, valentina colombo
wrote:
For this type of things I use a combination of 'outfile' and 'printf' commands. An example is below. The lines from 'open' to 'var' command are taken from gretl example sw_ch14.in. The result is the file "coefficients.csv" in your current gretl working directory. <hansl> open sw_ch14.gdt # set the robust std errors variant used by S and W set force_hc on set hc_version 1 genr infl = 400 * log(PUNEW/PUNEW(-1)) diff infl lags d_infl LHUR smpl 1962:1 1999:4 # run "automatic" VAR, (see equations 14.5 and 14.6) in Stock and Watson, # "Introduction to Econometrics", chapter 14 var 4 d_infl LHUR const -r ########## set messages off set echo off matrix B=$coeff scalar ncoefs=rows(B) outfile coefficients.csv --write loop i=1..ncoefs --quiet printf "%.4f, %.4f\n ", B[i,1], B[i,2] endloop outfile --close </hansl> --
|