【问题标题】:R: Reduce number of plots in quantile regression resultsR:减少分位数回归结果中的图数
【发布时间】:2021-07-11 21:26:26
【问题描述】:

通过使用以下代码,我可以绘制分位数回归模型的结果:

quant_reg_all <- rq(y_quant ~ X_quant, tau = seq(0.05, 0.95, by = 0.05), data=df_lasso)
quant_plot <- summary(quant_reg_all, se = "boot")
plot(quant_plot)

但是,由于有许多变量,这些图不可读,如下图所示:

包括标签,我有18个变量。

我如何同时绘制一些这样的图像以便它们可读?

【问题讨论】:

    标签: r plot quantile eps quantile-regression


    【解决方案1】:

    根据您无法使用的图表数量,您可以这样做:

    quant_reg_all <- rq(y_quant ~ X_quant, tau = seq(0.05, 0.95, by = 0.05), data=df_lasso)
    quant_plot <- summary(quant_reg_all, se = "boot")
    plot(quant_plot, 1:3)# plot the first 3
    plot(quant_plot, c(3, 6, 9, 10))# plot the 3rd, 6th, 9th and 10th plots
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-26
      • 1970-01-01
      • 2018-02-20
      • 1970-01-01
      • 2015-03-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多