如何在 coefplot 中标记 y 轴?
如何标记/重命名 y 轴上的变量?
sysuse auto, clear
regress price mpg trunk length turn if foreign==0
estimates store Option1
regress price mpg trunk length turn if foreign==1
estimates store Option2
coefplot Option1 Option2, drop(_cons) xline(1)
此 coefplot 中没有任何选项:将回归名称放在 y 轴上 就是我想要的。我想将 Mileage (mpg) 更改为 Mileage 等等。
编辑: 抱歉我的问题不清楚。我想在 y 轴上标记变量,如下所示:
sysuse auto, clear
keep if rep78>=3
regress mpg headroom i.rep##i.foreign
coefplot, xline(0) omitted baselevels drop(_cons) ///
headings(3.rep78 = "{bf:Repair Record}" ///
0.foreign = "{bf:Car Type}" ///
3.rep78#0.foreign = "{bf:Interaction Effects}") headings(3.rep78 = "{bf:Repair Record}" ///
我收到此错误消息:
command headings is unrecognized r(199); –
How do I label/rename the variables on y axis?
sysuse auto, clear
regress price mpg trunk length turn if foreign==0
estimates store Option1
regress price mpg trunk length turn if foreign==1
estimates store Option2
coefplot Option1 Option2, drop(_cons) xline(1)
None of the option in this coefplot: Putting names of regressions on y-axis is what I want. I want to to change Mileage (mpg) to Mileage and so on.
Edit:
Sorry for not being clear in my question. I want to label variables on y axis like this:
sysuse auto, clear
keep if rep78>=3
regress mpg headroom i.rep##i.foreign
coefplot, xline(0) omitted baselevels drop(_cons) ///
headings(3.rep78 = "{bf:Repair Record}" ///
0.foreign = "{bf:Car Type}" ///
3.rep78#0.foreign = "{bf:Interaction Effects}") headings(3.rep78 = "{bf:Repair Record}" ///
I got this error message:
command headings is unrecognized r(199); –
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
rename
对我来说效果很好。也许您之前在rename
中引用了变量标签而不是变量名称?rename
works fine for me. Maybe you referred to variable labels instead of the variable names inrename
before?