Using a matrix to run many LS regressions
Posted: 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
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