Logistic 回归的偏态分布

机器算法验证 r 回归 物流 样条
2022-03-24 13:29:51

我一直在开发基于英国国家头部创伤数据库的回顾性数据的逻辑回归模型。关键结果是 30 天死亡率(表示为Outcome30测量值)。整个数据库中的其他措施,已发表的证据表明对先前研究的结果有显着影响,包括:

Yeardecimal - Date of procedure = 1994.0-2013.99
inctoCran - Time from head injury to craniotomy in minutes = 0-2880 (After 2880 minutes is defined as a separate diagnosis)
ISS - Injury Severity Score = 1-75
Age - Age of patient = 16.0-101.5
GCS - Glasgow Coma Scale = 3-15
Sex - Gender of patient = Male or Female
rcteyemi - Pupil reactivity (1 = neither, 2 = one, 3 = both)
neuroFirst2 - Location of admission (Neurosurgical unit or not)
Other - other traums (0 - No, 1 - Yes)
othopYN - Other operation required
LOS - Length of stay in days
LOSCC - Length of stay in critical care in days 

当我对变量进行单变量分析时,我对每个连续变量进行了逻辑回归。但是,我无法对 Yeardecimal 进行建模,结果如下:

> rcs.ASDH<-lrm(formula = Survive ~ Yeardecimal, data = ASDH_Paper1.1)
singular information matrix in lrm.fit (rank= 1 ).  Offending variable(s):
Yeardecimal 
Error in lrm(formula = Survive ~ Yeardecimal, data = ASDH_Paper1.1) : 
  Unable to fit model using “lrm.fit”

但是,受限三次样条有效:

> rcs.ASDH<-lrm(formula = Survive ~ rcs(Yeardecimal), data = ASDH_Paper1.1)
> 
> rcs.ASDH

Logistic Regression Model

lrm(formula = Survive ~ rcs(Yeardecimal), data = ASDH_Paper1.1)

                      Model Likelihood     Discrimination    Rank Discrim.    
                         Ratio Test            Indexes          Indexes       
Obs          5998    LR chi2     106.61    R2       0.027    C       0.578    
 0           1281    d.f.             4    g        0.319    Dxy     0.155    
 1           4717    Pr(> chi2) <0.0001    gr       1.376    gamma   0.160    
max |deriv| 2e-08                          gp       0.057    tau-a   0.052    
                                           Brier    0.165                     

               Coef     S.E.    Wald Z Pr(>|Z|)
Intercept      -68.3035 45.8473 -1.49  0.1363  
Yeardecimal      0.0345  0.0229  1.51  0.1321  
Yeardecimal'     0.1071  0.0482  2.22  0.0262  
Yeardecimal''   -2.0008  0.6340 -3.16  0.0016  
Yeardecimal'''  11.3582  4.0002  2.84  0.0045  

谁能解释这是为什么?如果我无法使用更简单的方法进行建模,我会对使用模式复杂的模型感到紧张。

我目前正在使用受限三次样条来模拟 Age、ISS 和 Yeardecimal。有人会推荐任何替代方法吗?

2个回答

作为预测变量的日期可能会失败,因为它与常数高度共线。如果您将其输入为一年,它的可变性约为 10/2000 = 0.005(实际上更少,因为您的大部分数据都是在最近几年),当平方时,它变为 4e-6。当反转具有特征值 1 和 4e-6 的矩阵时,您使用的包可能会在有限精度算术中确定它为零,并抛出此错误消息。解决方案很简单——通过从年份中减去 2000 来使您的数据居中,至少近似地居中。

受限制的三次样条预计在这里可以很好地工作。您对预测变量的边际分布有些担心。

停留时间在因果路径中的错误部分,无法将其用作死亡的预测因子。并注意其他所需的操作。

我认为单变量分析没有多大价值。