I wrote this code for find the quantile regression plot with X-axis labels and Y-axis labels. But it only gives the plot without axis labels. How can I find the plot with axis labels for each variable.
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")
You probably need to enlarge the margins with the mar
option, e.g. 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))