r - 如何为 glmer 添加 CI 误差线并在 plot_model 中编辑截距图?
问题描述
我正在研究与健康人相比,被诊断患有精神疾病的人需要多长时间才能检测到恐惧、快乐和中性的情绪面孔。
我正在使用广义线性混合模型进行分析,最佳拟合模型如下:
gmod3.5 <- glmer(rt ~ Group * Emotion + trialnum2 +(1+Emotion|ID)+(1|Actor), data=CFS_21, family=Gamma(link="identity"))
因子组有两个层次(SZ、CG),因子情感有树层次(F、H、N),以年龄为中心。
对于情节,我编写了以下代码:
set_theme(base = theme_classic(), #To remove the background color and the grids
axis.title.size = 1.0, #To change axis title size
axis.textsize.x = 1.0, #To change x axis text size
axis.textsize.y = 1.0,
legend.item.backcol = "white",
legend.item.bordercol = "white",
legend.backgroundcol = "white",
legend.inside = TRUE)
p<-plot_model(gmod3.5, type = "int", vars = c("Emotion", "Group", "trialnum2"),
title="Response time per group considering the emotion",
colors = "Set2",
show.values = TRUE,
value.offset = .2,
value.size = 2,
dot.size = 2,
line.size = 1,
width = 1)
p + scale_y_continuous(limits = c(0, 4), breaks = c(0, 1, 2, 3, 4))
但是,我需要使用 CI 作为误差线并使组(CG 和 SZ)彼此更接近
有谁知道如何使用 plot_model 函数来做到这一点?
解决方案
推荐阅读
- databricks - 如何删除非托管三角洲湖表
- python-3.x - 如何在 Python 中将字节转换为 str?
- sql - 合并具有重复键的增量
- inheritance - Flutter:类型 <> 不是 <> 的子类型...但它是
- mysql - MySQL:如何提取表的最新记录?(较小的连接复杂性)
- python - slurm + matplotlib 占用大量内存
- javascript - 错误未捕获的 ReferenceError:未定义 Morris
- spring - 无法将依赖项添加到 pom.xml 文件
- python - Sklearn+Gensim:如何使用 Gensim 的 Word2Vec 嵌入进行 Sklearn 文本分类
- python - 从不同大小的原始数组构建数组的快速方法