r - 有没有办法在同一个图中绘制不同的回归模型?
问题描述
我在散点图中有一个数据集。我想“重叠”包含一些值而不是其他值的图表,但都在同一个数据集中。本质上,将相关性与 n=5、n=8 和 n=10 进行比较。有没有办法使用相同的数据为每一个设置我的回归线?
geom_point(aes(fill = Vaccine), pch = 21, color = 'black', size = 4) +
scale_fill_manual(values = color_list3) +
geom_smooth(method='lm', se=F, color="black", size = 0.5) +
stat_poly_eq(formula = y ~ x,
aes(label = paste(..eq.label.., ..rr.label.., sep = "~~~")),
parse = TRUE) +
theme_classic() +
theme(legend.title = element_text(face = "bold", hjust = 0.5),
legend.background = element_blank(),
legend.box.background = element_rect(colour = "black")) +
coord_capped_cart(bottom = 'both', left = 'both') +
labs(x = 'Log antibodies (GTM)', y = 'Vaccine efficacy')
解决方案
推荐阅读
- elasticsearch - 配置 Logstash 以接收多个节拍
- c - 如何忽略内联汇编中的输出?
- bash - 忽略目录
- regex - 无法使用 BeanShell 后处理器中的 RegEx 从位置 URL 读取值
- spring-boot - Spring Cloud Config Server JDBC + kafka 自动更新
- yaml - Azure管道基础模板在环境中插入名称键
- python - 如何从 C# wpf 应用程序安装 python 和模块(XlsWriter、Pandas 等)
- javascript - Spring Boot 获取映射 404
- javascript - 右对齐导航栏切换按钮并在 Bootstrap 5 中列出项目
- java - 正则表达式需要将数字匹配到小数点后 2 位,但允许 1 位数字为零