使用 rms 计算逻辑回归的 OR

Calculating OR for logistic regression using rms

我有一个逻辑回归模型,为此我一直在使用 rms 包。该模型最适合使用 tn1 的对数项,而对于临床解释,我使用的是 log2。我 运行 使用 rms 包中的 lrm 模型,然后仔细检查,我 运行 使用 glm。初始系数相同:

h <- lrm(formula = outcomehosp ~ I(log2(tn1 + 0.001)) + apscore_ad + 
emsurg + corrapiidiag, data = d, x = TRUE, y = TRUE)

            Coef    S.E.   Wald Z Pr(>|Z|)
Intercept       -3.4570 0.3832 -9.02  <0.0001 
tn1              0.0469 0.0180  2.60  0.0093  
apscore_ad       0.1449 0.0127 11.44  <0.0001 
emsurg           0.0731 0.3228  0.23  0.8208  

f <- glm(formula = outcomehosp ~ apscore_ad + emsurg + corrapiidiag + 
I(log2(tn1 + 0.001)), family = binomial(), data = tn24)

Coefficients:
                 Estimate Std. Error z value Pr(>|z|)    
(Intercept)          -3.45699    0.38315  -9.023  < 2e-16 
I(log2(tn1 + 0.001))  0.04690    0.01804   2.600  0.00932 
apscore_ad            0.14487    0.01267  11.438  < 2e-16 
emsurg                0.07310    0.32277   0.226  0.82082    

然而,当我尝试获得比值比时,两个模型之间的 tn1 明显不同,这似乎不是 log2 t运行sformation 的差异。

summary(h) 
         Effects              Response : outcomehosp 

 Factor               Low High  Diff. Effect    S.E.    Lower 0.95  Upper 0.95
 tn1                   0   0.21  0.21  0.362120 0.15417  6.5300e-02  0.673990 
 Odds Ratio           0   0.21  0.21  1.436400      NA  1.0675e+00  1.962100 
 apscore_ad           14  25.00 11.00  1.593600 0.15631  1.3605e+00  1.961000 
 Odds Ratio          14  25.00 11.00  4.921400      NA  3.8981e+00  7.106600 
 emsurg                0   1.00  1.00  0.073103 0.33051 -5.8224e-01  0.734860 
 Odds Ratio           0   1.00  1.00  1.075800      NA  5.5865e-01  2.085200 

exp(f$coefficients)
(Intercept)      0.03152467           
apscore_ad        1.15589222           
emsurg        1.07584115       
I(log2(tn1 + 0.001)) 1.04802

谁能解释一下 rms 包计算的比值比是多少?非常感谢。

summary(h)tn1 效应是对 tn1 比值比从 0 到 0.21(四分位间距)对数的影响。参见 ?summary.rms

所以,summary(h)第一行的效果是0.36212 = (log2(0.211)-log2(0.001))*.0469