我想把这个回归的系数画成一个森林图。
-------------------------------------------------------------------------------
price | Coefficient Std. err. t P>|t| [95% conf. interval]
--------------+----------------------------------------------------------------
foreign#rep78 |
Domestic#1 | -781.769 1013.428 -0.77 0.443 -2805.724 1242.186
Foreign#0 | -1529.739 1771.487 -0.86 0.391 -5067.642 2008.164
Foreign#1 | -81.34985 848.0347 -0.10 0.924 -1774.992 1612.292
|
_cons | 6358.405 485.1416 13.11 0.000 5389.511 7327.3
-------------------------------------------------------------------------------由coefplot (社区贡献命令)产生的林地只绘制最后的系数(-81),而不是其他系数(-782和-1530)。我哪里出问题了?
sysuse auto, clear
recode rep78 (1/3=0) (4/5=1)
reg price i.foreign#i.rep78
* Only plots last coefficient (-81)
coefplot, keep(*.foreign#*.rep78) mlabel
* Doesn't work either
coefplot, keep(0.foreign#1.rep78 1.foreign#0.rep78 1.foreign#1.rep78) mlabel发布于 2022-03-11 11:20:28
coefplot自动排除被标记为“省略”或“基本水平”的系数--就像你的系数一样。要在图中包含所有系数,您应该指定“省略”和“基本层”选项。所以它看起来像这样的东西:
sysuse auto, clear
recode rep78 (1/3=0) (4/5=1)
reg price i.foreign#i.rep78
coefplot, omitted baselevels mlabel有关该包的更多详细信息可在这里获得:http://repec.sowi.unibe.ch/stata/coefplot/getting-started.html
https://stackoverflow.com/questions/71404316
复制相似问题