Using a matrix to run many LS regressions

For questions regarding programming in the EViews programming language.

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

TonBr
Posts: 2
Joined: Fri Mar 04, 2011 5:20 am

Using a matrix to run many LS regressions

Postby TonBr » Wed Mar 09, 2011 9:12 am

Hi all,

First of all, I'm not sure if this is the correct sub-forum, so if not (I'm sorry) a moderator is welcome to move this thread to the correct sub-forum.

I'm testing (least squares, time series) company returns (stock prices) against the return of a market index and a commodity price.
For all these companies, the market index and the stock price are the same, so only 2 independent variables, but many dependent variables.
I know how to run a regression manually (as an equation: returncompany1 c marketindex commodity), so company after company, but there should be a way to run LS regression of many dependent variables (not only company1, but company1 to company500) at once, (or many equations at once).
Maybe important to note, I'm interested in the Coefficient, Prob and R-squared that Eviews calculates in a LS
These coefficients (and therefore also the Probabilities and R-squared) will differ with each company, and I need them separately

I was thinking that a matrix can help me with this, is this correct? If so, how should I proceed (construct and use this matrix) then, and if not, what will work (groups?)?

Hope my question is clear and you can help me with this.
Thanks in advance!

Ton

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

Re: Using a matrix to run many LS regressions

Postby EViews Gareth » Wed Mar 09, 2011 9:17 am

Reading through the Programming Guide should help you. It does very similar things.

TonBr
Posts: 2
Joined: Fri Mar 04, 2011 5:20 am

Re: Using a matrix to run many LS regressions

Postby TonBr » Wed Mar 09, 2011 10:39 am

Thanks for the quick reply, I'll check it out.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests