r - 如何在 R 中绘制多级模型处理效果
问题描述
我想绘制我的多级模型的 Group-Time-Interaction。我只设法在没有多级结构的情况下绘制它。我怎样才能包括嵌套?每位患者在同一台仪器上测量 3 次(治疗前、治疗中、治疗后)。患者被随机分为两组(候补名单和治疗组)。这是我的模型:
m8 <- lmer(score ~ 1 + +time*Group +(1| subject), data = df2)
这就是我所做的:
score <- data %>%
filter(!is.na(score)) %>%
group_by(ti, Gruppe, ar, ID) %>%
summarise(Max_Height = max(score)) %>% # Calculating max score
ungroup() %>% # Need to ungroup so that the pipe doesn't get confused
group_by(ti, Gruppe, ar) %>%
summarise(score = mean(Max_Height))
(basic_mm_scatter <- ggplot(score, aes(ti, score, colour = Gruppe)) +
geom_point() +
theme_bw() +stat_smooth(method = "lm",))
我也很想包括误差线。不知道怎么做。非常感谢您的帮助!!!非常感谢!
解决方案
推荐阅读
- r - R中的网络对象和邻接矩阵
- ios - Expo:上传到Apple App Store“跳过等待构建处理”
- perl - 宽字符和 Unicode 编码
- c++ - 覆盖 iostream << 导致错误 - C++ 11
- vuejs2 - 从 v-for 传递参数以动态更新 b-tab 标题
- powershell - 通过 PowerShell 从远程计算机上的服务器执行卸载设置
- python - python:如何首先根据值(可以为空/无/真/假)然后基于键对字典进行排序
- python - 使用 python3 在 pipenv 中设置 awscli
- java - 如何解决此“应用程序启动方法中的异常”
- amazon-web-services - 一次不能调用超过 64 个 Lambda 函数?