[英]Interpreting output from glmer Model in R including odds ratios and /or plotting data?
也许有人可以帮助我从 R 中的 glmer Model 中解释我的 Output? 一般来说,我会使用优势比进行解释——对吗? 但是,由于它低于 1,我不知道如何处理它?
我也一直在努力正确地 plot 我的数据。 也许有人对此有任何想法?
我真的很感激任何帮助或建议。
变量:
R-输出:
> summary(H1_T2x)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: Veraenderung_pos ~ Maske + (1 | VP)
Data: Data_T2x
AIC BIC logLik deviance df.resid
209.0 218.4 -101.5 203.0 167
Scaled residuals:
Min 1Q Median 3Q Max
-1.1298 -0.4901 -0.4103 0.7500 1.7910
Random effects:
Groups Name Variance Std.Dev.
VP (Intercept) 2.07 1.439
Number of obs: 170, groups: VP, 72
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.7258 0.3299 -2.200 0.0278 *
Maske -0.2998 0.4102 -0.731 0.4650
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr)
Maske -0.549
> Anova(H1_T2x, type=3)
Analysis of Deviance Table (Type III Wald chisquare tests)
Response: Veraenderung_pos
Chisq Df Pr(>Chisq)
(Intercept) 4.8395 1 0.02781 *
Maske 0.5339 1 0.46496
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> #H1: Konfidenzintervalle, Koeffizenten, odds ratio #####
> #confidence intervalls
> seH1 <- sqrt(diag(vcov(H1_T2x)))
>
>
> # table of estimates with 95% CI
> (tabH1 <- cbind(Est = fixef(H1_T2x), LL = fixef(H1_T2x) - 1.96 * se, UL = fixef(H1_T2x) + 1.96 *
+ seH1))
Est LL UL
(Intercept) -0.7258004 -1.372455 -0.07914585
Maske -0.2997611 -1.103823 0.50430057
>
> #odds ratio
> exp(tabH1)
Est LL UL
(Intercept) 0.4839371 0.2534839 0.9239052
Maske 0.7409952 0.3316010 1.6558270
我会说“戴口罩效果的优势比为 0.74(95% CI:0.33 - 1.65)。这意味着估计的效果是略微降低阳性风险(不戴口罩的概率为 0.33)到 0.26(戴口罩),但测量的效果没有统计学意义——数据也与增加阳性风险的口罩一致”。
几点注意事项:
VP
组之间的可变性(请参阅emmeans package的文档)confint()
来获取配置文件置信区间,而不是您在此处使用的 Wald CI(或broom.mixed::tidy(H1_T2x, conf.int = TRUE, conf.method = "profile", exponentiate = TRUE)
) 对于绘图,请参阅sjPlot
或ggeffects
或effects
包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.