我试图在 aglm
与二项式 dv 之后进行成对比较,并emmeans
报告优势比,而我需要概率差异。
library(magrittr)
library(emmeans)
glm(
am ~ wt * factor(vs),
family = binomial(),
data = mtcars
) %>%
emmeans(
~ vs | wt, at = list(wt = seq(2.6, 3.6, length.out = 10))
) %>%
pairs(type = "response")
返回
wt = 2.6:
contrast odds.ratio SE df z.ratio p.value
0 / 1 668.84887 3388.29452 Inf 1.284 0.1991
wt = 2.71111111111111:
contrast odds.ratio SE df z.ratio p.value
0 / 1 453.70452 2028.70137 Inf 1.368 0.1713