How to save residual series

For questions regarding programming in the EViews programming language.

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

jdollery
Posts: 13
Joined: Thu Feb 28, 2013 9:16 am

How to save residual series

Postby jdollery » Tue Nov 18, 2014 4:17 pm

Hello,
I need to run a multivariate regression for over 200 times on Eviews 7 and need to save the residual series into excel sheet each time for further undertaking RUNS test (I believe Eviews doesn't have RUNS test, am I right?). Could you please send me the codes that can save the residual series into excel sheet when I run a regression each time? as being a beginner in programming, I would be very grateful if you could help me.
Best regards,
Helen

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

Re: How to save residual series

Postby EViews Gareth » Tue Nov 18, 2014 4:27 pm

Use equation.makeresid to make the residuals into a series, then use wfsave to save the series into an Excel file.

EViews doesn't have the Runs test built in, but it does have the more popular Kolmogorov–Smirnov test. The Runs test shouldn't be too hard to program in EViews either.

jdollery
Posts: 13
Joined: Thu Feb 28, 2013 9:16 am

Re: How to save residual series

Postby jdollery » Tue Nov 18, 2014 5:30 pm

Dear Gareth

Many thanks for your prompt reply. As I need to run a number of regressions together, could I save different residual series at the same time to excel sheet? For example, I've tried writing the codes for running two equations together (please see below), but it did not work. Could you please help?

equation eq1
eq1.ls a1 c b1
eq1.makeresid1

equation eq2
eq2.ls a2 c b2
eq2.makeresid2

wfsave C:\Users\HUBS\Desktop\excelxml

Looking forward to your advice. Thanks very much.

Best regards,
Helen

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

Re: How to save residual series

Postby EViews Gareth » Tue Nov 18, 2014 6:00 pm

What doesn't work?

jdollery
Posts: 13
Joined: Thu Feb 28, 2013 9:16 am

Re: How to save residual series

Postby jdollery » Tue Nov 18, 2014 6:13 pm

Dear Gareth

I tried running the codes below to save two residual series into an excel sheet, but after running it, I didn't get an excel file on my desktop. There must be something wrong with my codes. Could you please give me your advice? Many thanks.

equation eq1
eq1.ls a1 c b1
eq1.makeresid

equation eq2
eq2.ls a2 c b2
eq2.makeresid

wfsave("type = excelxml") C:\Users\HUBS\Desktop

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

Re: How to save residual series

Postby EViews Gareth » Tue Nov 18, 2014 8:07 pm

You have to provide a file name

jdollery
Posts: 13
Joined: Thu Feb 28, 2013 9:16 am

Re: How to save residual series

Postby jdollery » Wed Nov 19, 2014 4:36 am

Thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests