R:减少分位数回归结果中的地块数量
R: Reduce number of plots in quantile regression results
通过使用以下代码,我可以绘制分位数回归模型的结果:
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个变量。
我当时如何绘制其中一些图像以便它们可读?
根据您不会的图表数量,您可以这样做:
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
通过使用以下代码,我可以绘制分位数回归模型的结果:
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个变量。
我当时如何绘制其中一些图像以便它们可读?
根据您不会的图表数量,您可以这样做:
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