View Full Version : Which sofware is suitable to estimate around 100 regression equations simultaneously?


becoolja
10-31-2007, 04:23 PM
Hi everyone,

I wish to get some idea from all you guys.

Which software should I use if

(1) I have time series of 100 companies

(2) The regression equation of each company will be estimated separately. The interaction between any company is NOT considered.

(3) The equation of each company is very simple : Yit = ai + bi*Xit +Uit; where Yit and Xit are the variables of each company.

(4) The error term (Uit) has a serial correlation and Newey-West Correction for HAC should be used to correct for HAC.

(4) The Null Hypothesis : ai=0 , bi=0. should be tested for each company.


My problem is that the only software I know is EVIEWS. The "System Equation" in Eviews allows me to estimate the equation of 100 companies simultaneously with no interaction between any company. But there is no option of "Newey-West" to correct for HAC. Therefore, the system equation is not suitable for my case. This means that I have to form the separate equation for each country and estimate one by one. Then, I have to test the null hypothesis for each company. It's quite a lot of task to run the equation and test the null hypothesis for one company a time...and then I have to repeat the same process for the remaining 99 companies.

Do you know any software that meets the above requirements (1) to (5)? I would be very much appreciated if I can use the other softwares that can save my time. Moreover, it seems that I have to estimate for the other countries and there will be around 100 companies in each country. Waiting for your idea.

Best wishes
Becoolja

Mike White
11-01-2007, 05:00 AM
In R there are functions like lapply and sapply that can do repeated operations on data in a list format. If your data is in more than one list you can use the mapply function to step through all the lists simultaneously.
If you can format the data for all companies as columns in a dataframe then you can use the apply function to process each column of data.
You will probably need to write your own function to do what you want and then you can use the above functions to repeatedly apply your function to each of the companies. It is essentially like programming a 'for next' loop.

mp83
11-01-2007, 06:20 AM
That's what I did for my Project on my Time Series Class [not a 100 times but around 15].Unfortunately,I lost the script on a recent format but it's not that difficult to do.You can use the sandwich package which provides much more estimators than EViews ever considered