EXPORT REGRESSION TO EXCEL

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

EXPORT REGRESSION TO EXCEL

Postby nano17440 » Sun Apr 12, 2015 7:23 pm

I want to export all my regression tables to excel.
I tried the function write, WRITE(T=XLS,T,B2,s=data) e:\these\data\these.xls
However, it did not work.

Which function should i use to do it ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Sun Apr 12, 2015 7:45 pm

What exactly do you mean by "all my regression tables"?

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Mon Apr 13, 2015 9:53 am

I did 4 OLS regression on my diferent portfolios.
I want to export automaticaly the results from the OLS regression into excel in order to present my results on word afterwards.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Mon Apr 13, 2015 10:15 am

If you only have 4, I'd say just copy and paste.

Programmatically, if you want to get the exact same output as in each regression, then you'll have to freeze each equation into a table, then use table.save to save it to disk.

You might be better off looking at the eqtabs add-in which takes all the information from all the regressions in your workfile, summarises it into one table, and then saves that to an Excel file.

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Mon Apr 13, 2015 10:25 am

In fact i have 4 regression for each model i run.
I am analyzing liquidity timing, market timing and volatility timing on different dates.
So i have around 30 regression in total.

If i do understand what you said, i should create a table for each regression in order to extract it ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Mon Apr 13, 2015 10:28 am

If you want the entire regression output, yes.

Another way to do it would be to create a spool object, put all the equations into the spool, then save the spool to disk as an RTF file, and bypass Excel all together.

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Mon Apr 13, 2015 10:52 am

How do i create a table to extract it afterwards on a excel file or compatible file ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Mon Apr 13, 2015 11:14 am

Code: Select all

freeze(mytab) eq.stats

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Mon Apr 13, 2015 12:23 pm

I tried this without any success
'freeze[mytab] eq.stats
'tab1.save(t=xls) e:\these\data\essai1.xls

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Wed Apr 15, 2015 9:06 am

I tried this without any success
'freeze[mytab] eq.stats
'tab1.save(t=xls) e:\these\data\essai1.xls

What should i do ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Wed Apr 15, 2015 9:10 am

You need parenthesis, not brackets.

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Thu Apr 16, 2015 3:49 pm

It said tab1 is not defined :|

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Thu Apr 16, 2015 4:16 pm

i did it wrong the first time, but it's still saying SAVE IS NOT A VALID VIEW

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: EXPORT REGRESSION TO EXCEL

Postby EViews Gareth » Thu Apr 16, 2015 4:40 pm

What is the exact command(s) you're using?

nano17440
Posts: 13
Joined: Fri Feb 20, 2015 2:02 pm

Re: EXPORT REGRESSION TO EXCEL

Postby nano17440 » Thu Apr 16, 2015 4:53 pm

freeze gmm1
gmm1.save (t=xls) gmm


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests