Dear Statalisters,
I have a problem reporting the output table of my regressions to a word file using the est store and esttab command. The following data is used:
Code:
* Example generated by -dataex-. To install: ssc install dataexclearinput str10 company_id float year double cashflowsalesratio_w long RD_Expense_w float ROE_w byte industry double Gov_score float(CSR_index KZ_index_w KZ_index_equally logassets firm) byte(_est_first _est_second _est_three _est_four _est_five _est_six)"048870-US" . . . . . . . . . . 1 0 0 0 0 0 0"090370-US" . . . . . . . . . . 2 0 0 0 0 0 0"145210-US" . . . . . . . . . . 3 0 0 0 0 0 0"4345-US" . . . . . . . . . . 4 0 0 0 0 0 0"6197-US" . . . . . . . . . . 5 0 0 0 0 0 0"7018-US" . . . . . . . . . . 6 0 0 0 0 0 0"A-US" 2001 . . . . . . . . 15.8932 7 0 0 0 0 0 0"A-US" 2002 -11.81 1169000 -.2007 1 86.29 .2473 . . 15.83944 7 0 0 0 0 0 0"A-US" 2003 -4.21 985000 -.5524 1 95.42 .39995 . . 15.651287 7 0 0 0 0 0 0"A-US" 2004 9.68 917000 .1092 1 85.59 .6637 .44746265 .9855955 15.76939 7 1 1 1 1 1 1"A-US" 2005 12.26 717000 .0855 1 96.84 .97205 -.22057977 .7764091 15.725202 7 1 1 1 1 1 1"A-US" 2006 18.48 634000 .8557 1 94.06 .9278 .6193494 1.0937542 15.812793 7 1 1 1 1 1 1"A-US" 2007 15.66 684000 .1854 1 89.52 .953 . . 15.837587 7 0 0 0 0 0 0"A-US" 2008 16.19 704000 .2393 1 93.23 .94955 1.3388083 1.3923626 15.75238 7 1 1 1 1 1 1"A-US" 2009 6.76 642000 -.0122 1 89.85000000000001 .93295 1.4547104 1.2244922 15.845237 7 1 1 1 1 1 1"A-US" 2010 14.14 609000 .2386 1 86.07000000000001 .91485 1.129111 1.0837486 16.067434 7 1 1 1 1 1 1"A-US" 2011 21.45 649000 .2686 1 87.42 .91755 .7009069 1.1156336 16.000324 7 1 1 1 1 1 1"A-US" 2012 20.47 668000 .243 1 89 .91795 .2992332 1.1961305 16.131603 7 1 1 1 1 1 1"A-US" 2013 18.67 695000 .1383 1 89.25 .9342 .26605803 1.1852111 16.184444 7 1 1 1 1 1 1"A-US" 2014 13.32 715000 .0952 1 87.36 .9047 .25054812 1.1310264 16.197924 7 1 1 1 1 1 1"A-US" 2015 40.34 326000 .0847 1 92.81 .9425 .51178944 1.4016647 15.82761 7 1 1 1 1 1 1"A-US" 2016 19.82 329000 .1099 1 94.07000000000001 .95015 -.04543943 1.0976666 15.86989 7 1 1 1 1 1 1"A-US" 2017 22.07 339000 .1508 . . . -.22934306 1.058009 15.947188 7 1 0 1 1 0 0"A-US" 2018 . . . . . . . . . 7 0 0 0 0 0 0"AA-US" 2011 . . . . . . . . 17.025225 8 0 0 0 0 0 0"AA-US" 2012 . . . . . . . . 17.025427 8 0 0 0 0 0 0"AA-US" 2013 6.22 86000 . . . . . . 16.866014 8 0 0 0 0 0 0"AA-US" 2014 12.28 95000 . . . . . . 16.684261 8 0 0 0 0 0 0"AA-US" 2015 12.31 69000 -.0861 . . . . . 16.577038 8 0 0 0 0 0 0"AA-US" 2016 6.5 33000 -.053 1 . .63275 . . 16.588099 8 0 0 0 0 0 0"AA-US" 2017 . . . . . . . . . 8 0 0 0 0 0 0"AABA-US" 2001 . . . . . . . . 14.682336 9 0 0 0 0 0 0"AABA-US" 2002 27.73 141766 .0202 6 51.82 .2053 .000902199 .9841178 14.841617 9 0 0 0 0 0 0"AABA-US" 2003 31.61 207285 .0718 6 86.89 .23195 .2205973 1.0787631 15.595814 9 1 1 1 1 1 1"AABA-US" 2004 30.92 368760 .1465 6 82.64 .29725 .21353115 1.1483319 16.010765 9 1 1 1 1 1 1"AABA-US" 2005 32.66 547137 .2421 6 77.28 .18585 .13635102 1.1179355 16.19599 9 1 1 1 1 1 1"AABA-US" 2006 21.12 833147 .0848 6 79.84 .1589 .20445994 1.0591695 16.236992 9 1 1 1 1 1 1"AABA-US" 2007 22.37 1084238 .0706 6 49.33 .45445 .1968187 1.0794947 16.294552 9 1 1 1 1 1 1"AABA-US" 2008 20.57 1221787 .0408 6 64.32000000000001 .65015 -.07123767 .940678 16.429472 9 1 1 1 1 1 1"AABA-US" 2009 18.96 1210168 .0504 6 76.64 .64625 .08134658 1.0011969 16.5143 9 1 1 1 1 1 1"AABA-US" 2010 25.56 1082176 .0983 6 70.96000000000001 .573 .0493967 1.0107279 16.515875 9 1 1 1 1 1 1"AABA-US" 2011 31.14 1005090 .0836 6 72.13 .39365 .05089188 1.0037756 16.506102 9 1 1 1 1 1 1"AABA-US" 2012 -17.09 885824 .2912 6 62.26 .2378 .05564491 .810153 16.646608 9 1 1 1 1 1 1"AABA-US" 2013 29.87 1008487 .0989 6 71.08 .30255 .29367688 1.0431517 16.635801 9 1 1 1 1 1 1"AABA-US" 2014 -17.09 1207146 .2903 6 77.43 .21095 .17513956 .8621037 17.941582 9 1 1 1 1 1 1"AABA-US" 2015 21.37 1177923 -.1286 6 80.51 .3995 .3584954 1.0316931 17.626215 9 1 1 1 1 1 1"AABA-US" 2016 16.01 1055462 -.0071 6 80.78 .31005 .35656485 1.0332286 17.688063 9 1 1 1 1 1 1"AABA-US" 2017 . . . . . . . . . 9 0 0 0 0 0 0"AAL-US" 2001 . . . . . . . . 17.307188 10 0 0 0 0 0 0"AAL-US" 2002 -6.33 . -1.1093 . . . . . 17.225569 10 0 0 0 0 0 0"AAL-US" 2003 -2.16 . -1.6205 . . . . . 17.194122 10 0 0 0 0 0 0"AAL-US" 2004 2.23 . . . . . . . 17.174948 10 0 0 0 0 0 0"AAL-US" 2005 1.74 . . . . . . . 17.199732 10 0 0 0 0 0 0"AAL-US" 2006 6.600000000000001 . . . . . . . 17.187794 10 0 0 0 0 0 0"AAL-US" 2007 7.09 . .4915 . . . . . 17.167902 10 0 0 0 0 0 0"AAL-US" 2008 -.48 . . 3 90.48 .53825 . . 17.041363 10 0 0 0 0 0 0"AAL-US" 2009 2.64 . . 3 92.10000000000001 .579 . . 17.051754 10 0 0 0 0 0 0"AAL-US" 2010 4.060000000000001 . . 3 89.73 .80145 . . 17.0379 10 0 0 0 0 0 0"AAL-US" 2011 2.37 . . 3 59.4 .7867 . . 16.987211 10 0 0 0 0 0 0"AAL-US" 2012 4.7 . . 3 62.7 .64425 . . 16.972937 10 0 0 0 0 0 0"AAL-US" 2013 4.24 . . 3 68.63 .70165 3.680891 2.0928328 17.559778 10 0 0 0 0 0 0"AAL-US" 2014 9.27 . . 3 83.38 .7518 2.8261926 1.9492944 17.594482 10 0 0 0 0 0 0"AAL-US" 2015 15.71 . 1.2002 3 89.83 .8181 2.3219178 1.9031236 17.642803 10 0 0 0 0 0 0"AAL-US" 2016 15.57 . .5682 3 91.74 .8536 2.6437316 1.9763083 17.723043 10 0 0 0 0 1 1"AAL-US" 2017 . . . . . . . . . 10 0 0 0 0 0 0"AAN-US" 2001 . . . . . . . . 12.892185 11 0 0 0 0 0 0"AAN-US" 2002 36.84 0 .1096 . . . .25828078 1.799257 13.089112 11 0 0 0 0 0 0"AAN-US" 2003 6.33 0 .1213 . . . .7316899 1.297437 13.22725 11 0 0 0 0 0 0"AAN-US" 2004 4.53 0 .1513 . . . .7920082 1.300039 13.459247 11 0 0 0 0 0 0"AAN-US" 2005 -3.85 0 .1433 . . . 1.212499 1.2523273 13.66296 11 0 0 0 0 0 0"AAN-US" 2006 5.05 0 .151 . . . .6117399 1.2409675 13.794906 11 0 0 0 0 0 0"AAN-US" 2007 6.99 0 .1254 . . . .7175243 1.3143893 13.922728 11 0 0 0 0 0 0"AAN-US" 2008 5.060000000000001 0 .1257 . . . .4917256 1.1937777 14.02518 11 0 0 0 0 0 0"AAN-US" 2009 8.97 0 .1366 1 38.73 .2276 .073226154 1.0933297 14.094245 11 0 0 0 0 0 0"AAN-US" 2010 5.46 0 .1268 1 56.19 .2232 .17500974 1.0628663 14.222356 11 1 1 1 1 1 1"AAN-US" 2011 10.54 0 .1163 1 75.14 .1699 .3071383 1.1591866 14.366604 11 1 1 1 1 1 1"AAN-US" 2012 6.97 0 .1638 1 75.55 .16185 .3109768 1.1231486 14.410455 11 1 1 1 1 1 1"AAN-US" 2013 12.21 . .106 1 68.53 .17605 .23014174 1.1333803 14.418283 11 1 1 1 1 1 1"AAN-US" 2014 44.09 . .0662 1 61.14 .13345 .4930905 1.983545 14.714388 11 0 0 0 0 1 1"AAN-US" 2015 48.94 . .1048 1 73.84 .23405 .4644325 1.969934 14.793414 11 0 0 0 0 1 1"AAN-US" 2016 48.94 . .0978 1 75.4 .30605 .17361325 1.7689294 14.774794 11 0 0 0 0 1 1"AAN-US" 2017 . . . . . . . . . 11 0 0 0 0 0 0"AAOI-US" 2009 . 5707 . . . . . . . 12 0 0 0 0 0 0"AAOI-US" 2010 4.62 5176 . . . . . . . 12 0 0 0 0 0 0"AAOI-US" 2011 .01 6451 . . . . . . 10.891597 12 0 0 0 0 0 0"AAOI-US" 2012 4.810000000000001 7603 . . . . . . 11.093584 12 0 0 0 0 0 0"AAOI-US" 2013 4.54 8512 -.0299 . . . .749444 1.0202379 11.6178 12 0 0 0 0 0 0"AAOI-US" 2014 10.32 15970 .0481 . . . .4225986 1.0340891 12.120896 12 0 0 0 0 0 0"AAOI-US" 2015 14.59 20852 .077 . . . .8111003 1.264431 12.518966 12 0 0 0 0 0 0"AAOI-US" 2016 15.62 31780 .159 1 . .18175 .3846734 1.1196076 12.647217 12 0 0 0 0 0 0"AAOI-US" 2017 . . . . . . . . . 12 0 0 0 0 0 0"AAON-US" 2001 . . . . . . . . 11.242363 13 0 0 0 0 0 0"AAON-US" 2002 13.61 0 .2601 . . . . . 11.42642 13 0 0 0 0 0 0"AAON-US" 2003 14.85 0 .2193 . . . .18447876 1.24962 11.53356 13 0 0 0 0 0 0"AAON-US" 2004 8.2 1072 .1085 . . . .14311095 1.1349857 11.563875 13 0 0 0 0 0 0"AAON-US" 2005 9.97 1681 .1522 . . . .10384604 1.1716275 11.640491 13 0 0 0 0 0 0"AAON-US" 2006 10.52 1974 .2003 . . . -.7912542 1.1931823 11.77572 13 0 0 0 0 0 0"AAON-US" 2007 11.57 2483 .2476 . . . -1.456842 1.192235 11.828757 13 0 0 0 0 0 0"AAON-US" 2008 13.52 2600 .2979 . . . . . 11.85469 13 0 0 0 0 0 0"AAON-US" 2009 15.74 3100 .2584 . . . -1.872065 1.0531924 11.958963 13 0 0 0 0 0 0end
I use the following regressions:
*including R&D: "Normal KZ Index"
*FE
xtreg KZ_index_w l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.RD_Expense_w l.Gov_score i.year, robust cluster(firm)fe
est store first
*RE
xtreg KZ_index_w l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.RD_Expense_w l.Gov_score i.industry i.year, robust cluster(firm)
est store second
*including R&D: "Equally weighted KZ Index"
*FE
xtreg KZ_index_equally l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.RD_Expense_w l.Gov_score i.year, robust cluster(firm)fe
est store three
*RE
xtreg KZ_index_equally l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.RD_Expense_w l.Gov_score i.year, robust cluster(firm)
est store four
*excluding R&D: "Normal KZ Index"
*FE
xtreg KZ_index_w l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.Gov_score i.industry i.year, robust cluster(firm)fe
est store five
*RE
xtreg KZ_index_w l.CSR_index l.logassets l.ROE_w l.cashflowsalesratio_w l.Gov_score i.industry i.year, robust cluster(firm)fe
est store six
I use the following esttab command:
esttab first second three four five six using regression1.rtf , label replace cells(b(star fmt(%9.5f)) t(par fmt(%9.3f))) star(* 0.10 ** 0.05 *** 0.01) ar2 obslast keep(CSR_index) title(CSR_KZ) indicate("Controls= $logassets ROE_w cashflowsalesratio_w RD_Expense_w Gov_score""Industry FE = *industry*" "Year FE = *year*" labels(Yes No))
When I use the esttab command above i get the following response:
coefficient ROE_w not found
I also tried to do it with including the lagged controls (("Controls= $l.logassets l.ROE_w l.cashflowsalesratio_w l.RD_Expense_w l.Gov_score", however, that is also not working. When including the lagged controls I get kind of the same response:
coefficient l.ROE_w not found
Does anybody sees what goes wrong and how to handle this issue?
Many thanks in advance!
Arnout