简体   繁体   English

CLMM/CLMM2 (R) 中优势比的置信区间

[英]Confidence Intervals for odds ratio in CLMM/CLMM2 (R)

I am trying to find the best way to estimate the confidence intervals for odds ratios as a part of CLMM output.我试图找到最好的方法来估计优势比的置信区间作为 CLMM 输出的一部分。 I am working in R, and my model looks something like this:我在 R 中工作,我的模型看起来像这样:

model <- clmm(Rating ~ Problem+Condition+(1|Subject), data = data, Hess=TRUE, nAGQ=10)

> summary(model)
Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite 
quadrature approximation with 10 quadrature points 

formula: Rating ~ Problem + Condition + (1 | Subject)
data:    data

 link  threshold nobs logLik   AIC     niter     max.grad cond.H 
 logit flexible  1106 -1114.39 2244.79 545(1638) 1.57e-03 3.1e+01

Random effects:
 Groups  Name        Variance Std.Dev.
 Subject (Intercept) 0.3296   0.5741  
Number of groups:  Subject 96 

Coefficients:
           Estimate Std. Error z value Pr(>|z|)    
Problem1    -0.9696     0.1814  -5.345 9.03e-08 ***
Problem2     0.7001     0.1715   4.083 4.45e-05 ***
Problem3    -0.1745     0.1711  -1.020   0.3078    
Condition1   0.3057     0.1440   2.124   0.0037 **  
Condition2   0.1103     0.1427   0.773   0.4396    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

I understand that the odds ratio for the parameter estimates are just exp(β).我知道参数估计的优势比只是 exp(β)。 Is there a way to calculate confidence intervals for the odds ratio?有没有办法计算优势比的置信区间? Open to other ways to express the magnitude of these effects?愿意用其他方式来表达这些影响的程度吗? Thanks!谢谢!

Just had to do something similar, here is my solution:只需要做类似的事情,这是我的解决方案:

Obtain the 95% CI for a fitted model (in the example below: "models.OrdinalMixed_1") with clmm with使用 clmm 获取拟合模型的 95% CI(在下面的示例中:“models.OrdinalMixed_1”)

CI_tables.OrdinalMixed_1 <- confint(models.OrdinalMixed_1, level = 0.95)

and then you can exponentiate the 95% CIs just like your coefficients":然后你可以像你的系数一样对 95% 的 CI 取幂”:

exp(CI_tables.OrdinalMixed_1)

You can confirm by calculating the CI's manually (exemplified by your coefficient for "Problem2"):您可以通过手动计算 CI 来确认(以您的“问题 2”系数为例):

exponentiate your coefficient for your OR:为您的 OR 取系数:

exp(0.7001)

[1] 2.013954 [1] 2.013954

calculate the upper CI by exponentiating your coefficient + 1.96 * the standard error of the term (this is an approximation!)通过对系数取幂 + 1.96 * 项的标准误差来计算上 CI(这是一个近似值!)

exp(0.7001 + (1.96*0.1715))

[1] 2.818599 [1] 2.818599

should be very similar to your result in the OR CI table from above.应该与上面 OR CI 表中的结果非常相似。 Hope this is helpful.希望这是有帮助的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM