Multiple series regressed on one model

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Eltun
Posts: 11
Joined: Thu Jul 31, 2014 11:59 am

Multiple series regressed on one model

Postby Eltun » Tue Aug 12, 2014 7:18 pm

Hi,

I have got more than 200 series and just one model. So , this model should be regressed on each fund separately and the results should be saved, because for each series it is gonna give me different results.
Now, I would say that it is going to much time for me to Estimate equation for each fund separately.
Is there any ready command in Eviews to use, or how to program it?

Kindly ask You to assist me in this case.

thanks in advance for your cooperation!

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

Re: Multiple series regressed on one model

Postby EViews Gareth » Tue Aug 12, 2014 8:04 pm


Eltun
Posts: 11
Joined: Thu Jul 31, 2014 11:59 am

Re: Multiple series regressed on one model

Postby Eltun » Wed Aug 13, 2014 5:42 am

Dear Gareth,

Sorry to bother You.
But, I have tried to use the following command:

'create a workfile
wfcreate q 1990 2010

'create a group which will contain the xs
group xs

'create 5 series
for %i GDP UNEMP INFL CPI M1
series {%i}=nrnd
xs.add {%i}
next

'create vector to store r-squares
vector(10) r2s

'create empty equation to be used inside the loop
equation eq

''counter of how many equations we have run
!rowcounter=1

'run pairwise regressions between each series
for !i=1 to xs.@count-1
%iname = xs.@seriesname(!i)
for !j=!i+1 to xs.@count
%jname = xs.@seriesname(!j)
eq.ls {%iname} c {%jname}
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
next
next

---------------------
But couldn't figure out what to write for the place of "i" and "j". Should I write the names of series? Besides, for eq.ls {%iname} c {%jname}.
In the meantime, as I mentioned before there are more than 200 series and each differently named and I need to store each coefficient of independent variables, the correspondent P-value and Adjusted R-squared

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

Re: Multiple series regressed on one model

Postby EViews Gareth » Wed Aug 13, 2014 7:45 am

You don't need to replace i and j with anything.

Eltun
Posts: 11
Joined: Thu Jul 31, 2014 11:59 am

Re: Multiple series regressed on one model

Postby Eltun » Wed Aug 13, 2014 7:56 am

So, just to copy and paste the command as it is?
But it says, "the flow command is executed" and nothing more

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

Re: Multiple series regressed on one model

Postby EViews Gareth » Wed Aug 13, 2014 8:06 am

You have to put it into an EViews program (File->New Program)

Eltun
Posts: 11
Joined: Thu Jul 31, 2014 11:59 am

Re: Multiple series regressed on one model

Postby Eltun » Wed Aug 13, 2014 11:24 am

I have attached a sample file.
For example from eq01 model, how get a list of series with coefficients, p-values and R-squared.

Kindly ask You to help
Attachments
test.WF1
(17.8 KiB) Downloaded 217 times

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

Re: Multiple series regressed on one model

Postby EViews Gareth » Wed Aug 13, 2014 1:00 pm

You'll have to write a program to do it. The thread I liked has plenty of examples. You'll have to read through and learn.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests