使用mcmc_areas()函数绘制多个图的问题
因此,我想使用贝舍平台创建几块后验样品图。 我的数据包含几个绘制分为特征(列“相关”包含后值):
head(cors_feat [cors_feat $ feature == 1,])
feature correlation
1 1 -0.5002517
2 1 0.1964202
3 1 -0.8603918
4 1 -0.7111672
5 1 0.1760033
6 1 0.2788863
head(cors_feat [cors_feat $ feature == 2,]))
feature correlation
40001 2 -0.7149123
40002 2 -0.7666210
40003 2 -0.7542937
40004 2 -0.2094619
40005 2 0.4089077
40006 2 -0.8550481
i循环通过功能,在循环中,我使用函数mcmc_areas()创建图:
lst <- list()
for (i in 1:length(unique(cors_feat$feature))){
lst <- c(lst,mcmc_areas(cors_feat[cors_feat$feature==i,], pars = c("correlation"), prob = 0.95))
}
当我尝试尝试时从“ cowplot”库中使用plot_grid函数,我会收到以下错误:
plot_grid(plotlist = lst)
There were 50 or more warnings (use warnings() to see the first 50)
最重要的是,我看不到任何图。
我该如何解决这个问题?
So, I wanted to create several plots of my posterior sample using bayesplot.
My data contains several draws divided into features (the column "correlation" contains the posterior values):
head(cors_feat[cors_feat$feature==1,])
feature correlation
1 1 -0.5002517
2 1 0.1964202
3 1 -0.8603918
4 1 -0.7111672
5 1 0.1760033
6 1 0.2788863
head(cors_feat[cors_feat$feature==2,])
feature correlation
40001 2 -0.7149123
40002 2 -0.7666210
40003 2 -0.7542937
40004 2 -0.2094619
40005 2 0.4089077
40006 2 -0.8550481
I loop through the features, and in the loop I use the function mcmc_areas() to create the plots:
lst <- list()
for (i in 1:length(unique(cors_feat$feature))){
lst <- c(lst,mcmc_areas(cors_feat[cors_feat$feature==i,], pars = c("correlation"), prob = 0.95))
}
When I try to use the plot_grid function from from the "cowplot" library I get the following error:
plot_grid(plotlist = lst)
There were 50 or more warnings (use warnings() to see the first 50)
And most importantly, I cannot see any plot.
How can I solve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论