Hello everyone.
For my thesis I have to run a OLS regression estimated cross-sectionally by industry and fiscal year(see underneath). But my question is not about how to do this, but about the output Stata is generating. Because I have 209 industry-year combinations, Stata runs 209 different industry-year regressions and therefore also the output of the regression underneath are 209 tables. But of course, for my thesis these results have to be in one table instead of 209.
How can I get the results of these 209 seperate tables into one table??
sum sic2id
local k=r(max)
forvalues i=1(1)`k'{
qui reg CCE CE1 CCEChange ATOChange ACC1 ACC SALESC NEGSALESC if sic2id==`i'
qui predict res if sic2id==`i', res
qui replace UECCE=res if sic2id==`i'
qui replace r2b=e(r2_a) if sic2id==`i'
qui replace c1=_b[CE1] if sic2id==`i'
qui replace c2=_b[CCEChange] if sic2id==`i'
qui replace c3=_b[ATOChange] if sic2id==`i'
qui replace c4=_b[ACC1] if sic2id==`i'
qui replace c5=_b[ACC] if sic2id==`i'
qui replace c6=_b[SALESC] if sic2id==`i'
qui replace c7=_b[NEGSALESC] if sic2id==`i'
qui drop res
di `i' " / " `k'
}
Kind Regards,
Sjoerd
Related Posts with Output OLS Regression
interpretation of margins from probit modelHi, I obtained the following results usin margins on a probit model Code: Regression model to measu…
keeping only unique values using egen concatHello, I am trying to generate an indicator called mo_all using egen and concat that records all th…
npgraph, post estimation command for npregressHi everyone, Hope you are doing great. So I'm currently working with the command npregress and want…
long string matchingI have 2 data sets of products 1) asicc product codes and corresponding product names 2) hs 1996 pro…
outreg2Hello, I have a question regarding exporting the Stata table using outreg2. The following is my cod…
Subscribe to:
Post Comments (Atom)
0 Response to Output OLS Regression
Post a Comment