簡體   English   中英

R:減少分位數回歸結果中的圖數

[英]R: Reduce number of plots in quantile regression results

通過使用以下代碼,我能夠 plot 我的分位數回歸 model 的結果:

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)

然而,由於有許多變量,這些圖是不可讀的,如下圖所示: 在此處輸入圖像描述

包括label,我有18個變量。

我怎么能在當時 plot 一些這些圖像,以便它們可讀?

根據您無法使用的圖表數量,您可以執行以下操作:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM