小编Ahs*_*hsk的帖子

如何在ggplot2中绘制混合模型的交互效果?

我想获得模型交互效果的预测(例如使用sjPlot::plot_modelggeffects打包,然后将它们提供给 ggplot2 以可视化 ggplot2 中的交互。有人可以帮助编写代码来做到这一点吗?我的问题与堆栈上的其他问题不同,因为它首先使用标准包进行预测,然后绘制它们。

\n

我当前的型号:

\n
model <- glmmTMB(total_count ~ mean_temp*lwd_duration + (1|year), family = nbinom1, data=df)\n\nsummary(model)\n\nFamily: nbinom1  ( log )\nFormula:          total_count ~ mean_temp * lwd_duration + (1 | year)\nData: df\n\n     AIC      BIC   logLik deviance df.resid \n   260.6    270.7   -124.3    248.6       34 \n\nRandom effects:\n\nConditional model:\n Groups Name        Variance  Std.Dev. \n year   (Intercept) 3.683e-09 6.069e-05\nNumber of obs: 40, groups:  year, 4\n\nDispersion parameter for nbinom1 family ():  178 \n\nConditional model:\n                        Estimate Std. Error z value Pr(>|z|) …
Run Code Online (Sandbox Code Playgroud)

plot regression r ggplot2 mixed-models

1
推荐指数
1
解决办法
249
查看次数

标签 统计

ggplot2 ×1

mixed-models ×1

plot ×1

r ×1

regression ×1