如何去除r中系数图零点处的水平线?

3lxsmp7m  于 2023-03-05  发布在  其他
关注(0)|答案(1)|浏览(125)

我使用以下代码创建了此打印:

coefplot(list(
  feols(inc_ratio ~ provtariff | hhid02 + year,
        subset(inc_0206_spouse_p, Female == 1 & educ > 9 & year == 2002 | year == 2006),
        weights = ~hhwt, 
        vcov = ~tinh),
  feols(inc_ratio ~ provtariff | hhid02 + year,
        subset(inc_0206_spouse_p, Female == 1 & educ > 5 & educ < 10 & year == 2002 | year == 2006),
        weights = ~hhwt, 
        vcov = ~tinh),
  feols(inc_ratio ~ provtariff | hhid02 + year,
        subset(inc_0206_spouse_p, Female == 1 & educ < 6 & year == 2002 | year == 2006),
        weights = ~hhwt, 
        vcov = ~tinh)), main = "Effect of BTA on women's relative income \n(by eduction level)")
legend("bottomleft", col = 1:3, pch = 1, lwd = 2, cex = 0.7, bty = "n", 
       legend = c("Agriculture", "Wearing apparel and leather", "Manufacturing"))

有没有办法可以删除零处的水平线或使水平线成为虚线?
谢谢大家!

pgccezyw

pgccezyw1#

尝试在coefplot()函数中添加zero = FALSE

coefplot(zero=FALSE, list....)

或者,如果要添加虚线:

coefplot(zero.par = list( type="l", lty=2), list...)

相关问题