首页 文章

R中的VGAM百分位曲线图

提问于
浏览
0

我正在运行来自VGAM帮助文件的代码:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

如何防止在绘图上放置点以使图形仅显示百分位数曲线?在qtplot中是否有一些选项可以抑制此图上的点,因此我不需要像在此页面上那样使用long ggplot route:Percentiles from VGAM?在我之前的问题中还有其他问题,所以这一点被忽略了 . 谢谢你的帮助 .

1 回答

  • 0

    没有 qtplot 帮助页面,所以我去了包帮助索引并看到 qtplot.lmscreg 列出 . 它有'pcol.arg'来控制点颜色,所以我把它设置为"transparent":

    qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, 
                xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4, 
                pcol.arg="transparent")
    

    enter image description here

相关问题