【发布时间】:2023-03-23 23:13:01
【问题描述】:
在Stata,我想运行一个回归并直观地显示每个变量的系数及其相对于零的置信区间,如下图所示:
sysuse auto
regress price mpg weight length foreign gear_ratio headroom rep78
margins, dydx(*)
marginsplot, horizontal recast(scatter) xline(0, lcolor(red)) xscale(range()) yscale(reverse)
在y 轴 上,我想显示变量标签(在右侧)而不是变量名。可以使用哪些选项来进行该配置?
storage display value
variable name type format label variable label
-----------------------------------------------------------------------------------------------------------------------
price int %8.0gc Price
mpg int %8.0g Mileage (mpg)
weight int %8.0gc Weight (lbs.)
length int %8.0g Length (in.)
foreign byte %8.0g origin Car type
gear_ratio float %6.2f Gear Ratio
headroom float %6.1f Headroom (in.)
rep78 int %8.0g Repair Record 1978
我意识到这可能是一个基本问题,但任何想法都值得赞赏!
【问题讨论】:
标签: stata