2

我编写了这段代码来查找带有 X 轴标签和 Y 轴标签的分位数回归图。但它只给出没有轴标签的情节。如何找到每个变量的轴标签图。这是分位数回归图,它没有给出轴标签,但给出了主标签

library(quantreg)

quantile <- c(0.10, 0.20, 0.45, 0.70, 0.90)

fitqr <- rq(logbmi ~ age + total_children_born + education + 
              wealth + Residence + Region + Husband_educ + cur_work, 
            data=dat, tau=quantile , method="fn")
plot(summary(fitqr), lwd=1, pch=20 , cex=1.5, xlab="quantile", 
     ylab="coefficient")
4

1 回答 1

1

您可能需要使用mar选项扩大边距,例如mar=c(5.1, 4.1, 2.1, 2.1).

例子

plot(summary(rq(Sepal.Length ~ Petal.Length + Petal.Width + 
                  Species, tau=quantile, method="fn", data=iris)),
     xlab="tau", ylab="coefficient", mar=c(5.1, 4.1, 2.1, 2.1))

在此处输入图像描述

于 2019-10-14T09:04:31.360 回答