为什么 coefplot 不绘制 Stata 中所有级别的交互?
Why does coefplot not plot all levels of interaction in Stata?
我想将此回归的系数绘制为森林图。
-------------------------------------------------------------------------------
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
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
我想将此回归的系数绘制为森林图。
-------------------------------------------------------------------------------
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
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