gpt4 book ai didi

glm - 将置信区间添加到 GLM allEffects 图

转载 作者:行者123 更新时间:2023-12-01 13:47:50 28 4
gpt4 key购买 nike

我需要在我的 glm 图上添加 95% 的置信区间。

当我执行 multiline=T 时(因为我需要在同一个地 block 上进行 2 次处理,所以我这样做了),间隔消失了。我怎样才能让他们回来?

这是我现在拥有的:

plot(allEffects(fit1), ylab= "Age of onset of foraging", main="",
type="rescale", multiline=T, rescale.axis=F)

据我所知-RFID 是一种识别蜜蜂并跟踪它们移动的技术; 2 处理:控制和病原体处理; "first.trip"- 距离他们第一次觅食旅行的天数。这(第一次/旅行)是我感兴趣的,为此我需要我的 allEffectsplot 上的 95% 置信区间..

RFID = 01 0c 1d 1e 1f
colony = A A A B B
treatment = control DWV control control DWV
first.trip = 19 NA NA 17 17 17
last.trip = 22 NA NA 17 31 30

最佳答案

来自?plot.eff:

ci.style: confidence bounds can be indicated using error bars, using lines or confidence bands, depending on the plot type. ... For multiline plots, the default is ‘"none"’ for no confidence bounds, but style ‘"bars"’ or ‘"bands"’ can also be used.

使用 ?plot.eff 中的示例:

library(effects)
mod.cowles <- glm(volunteer ~ sex + neuroticism*extraversion,
data=Cowles, family=binomial)
eff.cowles <- allEffects(mod.cowles, xlevels=list(extraversion=seq(0, 24, 6)),
given.values=c(sexmale=0.5))
plot(eff.cowles, 'neuroticism:extraversion',multiline=TRUE,
ci.style="band")

enter image description here

关于glm - 将置信区间添加到 GLM allEffects 图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34472203/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com