将SJPLOT的几个预测图放在一个窗口中
使用“ pred”函数使用SJPLOT时,我遇到了一个问题。 对于我目前的模型,模型中使用了三个预测指标。
NQuart3.1 <-
glmmTMB(Pos_count ~ Predsumscale + Buildscale +
(1|Territory),
offset = log(Ndays),
dispformula = ~Roadscale + Buildscale,
data = NightQuart3,
family = nbinom1(link = "log")
)
当我在此上使用sjplot时,它将为我提供2个单独的图形。 一个用于buildscale,另一个用于predsumscale,分开。
plot_model(NQuart3.1, type = "pred",
title = "Wolf space use night estimates April - June",
axis.title = "Wolf GPS locations")
$Predsumscale
(http://127.0.0.1:26952/graphics/ede13814-0fa4-4ba3-8c20-ae47c68dcabc.png)
$Buildscale
(http://127.0.0.1:26952/graphics/fe656c83-5bb0-4692-ad35-dd23a7ce3f0a.png)
我想知道您是否可以调整代码,以便将两个图组合在一个绘图窗口中?
不是组合,而只是并排。
这将使将模型与多个参数进行比较变得更加容易。
提前致谢
I've come across a problem when using sjPlot using the "pred" function.
With the model I currently have, three predictors are used in the model.
NQuart3.1 <-
glmmTMB(Pos_count ~ Predsumscale + Buildscale +
(1|Territory),
offset = log(Ndays),
dispformula = ~Roadscale + Buildscale,
data = NightQuart3,
family = nbinom1(link = "log")
)
when I use sjplot on this, it will provide me with 2 separate graphs.
One for Buildscale and one for Predsumscale, separated.
plot_model(NQuart3.1, type = "pred",
title = "Wolf space use night estimates April - June",
axis.title = "Wolf GPS locations")
$Predsumscale
(http://127.0.0.1:26952/graphics/ede13814-0fa4-4ba3-8c20-ae47c68dcabc.png)
$Buildscale
(http://127.0.0.1:26952/graphics/fe656c83-5bb0-4692-ad35-dd23a7ce3f0a.png)
I was wondering if you can adjust the code so that it would combine both graphs in one plot window?
Not combined but just side-by-side.
This would make it a lot easier to compare models with multiple parameters.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道一种讲述
plot_model()
明确地说“请将所有这些都放在同一绘图窗口中”的方法,但是有许多简单的方法可以采用绘图对象并将组件呈现一个带有不同布局的窗口。设置:
sjplot
具有plot_grid()
,但似乎不是很灵活。或
cowplot
具有plot_grid()
,还有更多选项patchwork
可能是最灵活的。I don't know of a way to tell
plot_model()
explicitly "please put all of these in the same plot window", but there are many easy ways to take the plot object and render the components within a single window with different layouts.Setup:
sjPlot
has aplot_grid()
, but it doesn't seem very flexible.or
cowplot
has aplot_grid()
with many more optionspatchwork
is probably the most flexible.