I have an unbalanced panel dataset of approximately 3,000 firms over a period of 20 years, with approximately 20,000 firm years.
Every firmyear contains information on a couple of dozen variables and every firm is part of an industry, identified by a SIC code.
Now I would like to run OLS regressions for every 2-digit SIC industry (approximately 60) and every fiscal year (20 years).
Since running 1200 regressions manually is a bit inefficient, I am looking for help to program this in Eviews.
The regression model is linear and has 3 independent variables: Y = a+b1X1+b2X2+b3X3+e
I also need to save all four parameter estimates for all the separate 1200 cross-sectional regressions and in addition, the residuals of these models, both preferably in one series.
So saving "resid" to e.g. the series "residuals" after every regression, resulting in one series that contains the residual for every observation estimated by one of the 1200 regressions. The same idea for the parameters estimates, which would result in four series that contain 1200 unique values for the constant, b1, b2 and b3. Saving in one series is not strictly necessary, but otherwise this would result in (4+1) x 1200 = 6000 series.
But perhaps there is an easier way to accomplish this...
I have already read the Eviews manual and the introduction to programming on this forum, but after hours of trying I'm afraid programming is not my strength
If someone is able to provide a program or guide me into the right direction, I would be extremely grateful! If my description is unclear, please let me know.
