Page 1 of 1

Export to csv or txt from VAR workfile

Posted: Tue Jun 16, 2009 10:55 pm
by tmlai
Hi, everyone. I am new to program in eviews.

First, I would like to export the VAR results and its equations from eviews. However, the following codes I program occur some errors to block the VAR results.

VAR G_VAR.LS 1 2 GDP property @ C
SHOW G_VAR
G_VAR.save(t=csv) G_VAR

I can export the VAR results in eviews interface but not the code.

Second, I would like to use the eviews program code to export the VAR equations, which I can obtain from "View -> representations" in VAR workfile, to csv/txt file. Can anyone help me code it?

Thanks.

Re: Export to csv or txt from VAR workfile

Posted: Wed Jun 17, 2009 8:04 am
by EViews Gareth
For the first part, freeze the var results first, then save the table to disk.

For the second part, you're out of luck, you cannot save the representations view to disk in a program.

Re: Export to csv or txt from VAR workfile

Posted: Wed Jun 17, 2009 7:00 pm
by tmlai
Thank you. But code the following, eviews display "G_VAR exists in FREEZE(G_VAR)".

VAR G_VAR.LS 1 2 GDP property @ C
SHOW G_VAR
FREEZE(G_VAR)
G_VAR.save(t=csv) G_VAR

How can I save the VAR results to csv or txt? What's wrong for the codes?
For LAGLEN and testexog, I can save them but not the VAR results.
Thanks!

Re: Export to csv or txt from VAR workfile

Posted: Thu Jun 18, 2009 11:14 am
by EViews Glenn
Your freeze has to be to a new object as G_VAR does indeed exist, and is a VAR. Save to G_VAR_OUT

Code: Select all

freeze(g_var_out) g_var.output g_var_out.save(t=csv) g_var_out

Re: Export to csv or txt from VAR workfile

Posted: Tue Sep 21, 2010 10:31 am
by tmlai
Thanks for your help!

But then I code to save the equation using "representation" as follows:

FREEZE(g_var_rep) g_var.representations(p)
g_var_rep.save(t=txt) g_var_rep

It works but the text dialog box is open. As I did a lot of VAR and eviews open a lot dialog box, it warns me to close dialog box and stop my program. Can anyone tell me the syntax to close the dialog box or to save the VAR equations without dialog box display?