Data Processing

Read data

CRS_raw <- read.csv("./SAnnaCRS.csv", sep=";")
CRS_proc <- CRS_raw
dim(CRS_proc)
## [1] 156 150
str(CRS_proc[,1:28])
## 'data.frame':    156 obs. of  28 variables:
##  $ ID                : Factor w/ 156 levels "P1","P10","P100",..: 1 69 80 91 102 113 124 135 146 2 ...
##  $ Age               : int  39 51 46 42 52 37 73 50 50 49 ...
##  $ Etiology          : Factor w/ 8 levels "Anossia","Infettivo",..: 5 7 7 4 7 4 7 1 7 4 ...
##  $ Etiology_mod      : Factor w/ 11 levels "Anossia_extraos",..: 8 10 10 7 10 7 10 1 10 7 ...
##  $ DateOfEvent       : Factor w/ 146 levels "01/01/2013","01/02/2010",..: 143 36 85 68 124 41 104 63 10 83 ...
##  $ DateOfAdmission   : Factor w/ 150 levels "01/02/2012","01/08/2011",..: 37 141 2 18 145 98 17 34 100 39 ...
##  $ DipOrigin         : Factor w/ 32 levels "GCA Pisa","NCH CS",..: 27 11 11 22 13 11 27 14 2 13 ...
##  $ Craniectomy       : Factor w/ 2 levels "NO","SI": 1 2 1 2 1 2 2 1 1 1 ...
##  $ Cranioplasty      : Factor w/ 5 levels "","NO","Progr NO",..: 1 2 1 2 1 2 2 1 1 1 ...
##  $ ComplicationsNCH  : Factor w/ 17 levels "","Cisti III Ventr",..: 15 8 1 15 1 1 7 1 1 1 ...
##  $ Operations        : Factor w/ 7 levels "","DVP","Embolizzazione",..: 4 1 1 2 1 1 1 1 1 1 ...
##  $ OtherComplications: Factor w/ 58 levels "","Afasia","Aritmia Card",..: 1 2 1 30 1 1 1 1 1 1 ...
##  $ Dysautonomia      : Factor w/ 2 levels "","SI": 1 1 1 1 1 1 1 1 1 1 ...
##  $ DRS_Adm           : int  24 22 18 24 23 26 22 27 24 22 ...
##  $ DRS_Dis           : int  21 19 6 21 20 30 30 25 11 12 ...
##  $ GOS               : int  3 3 4 3 3 1 1 2 4 3 ...
##  $ SNG_Adm           : Factor w/ 2 levels "","SNG": 1 1 2 1 1 1 1 1 2 2 ...
##  $ SNG_Dis           : Factor w/ 3 levels "","OS","SNG": 1 1 2 1 1 1 1 1 2 1 ...
##  $ PEG_Adm           : Factor w/ 3 levels "","NO","SI": 3 2 1 3 2 2 3 2 1 1 ...
##  $ PEG_Dis           : Factor w/ 3 levels "","NO","SI": 3 3 1 3 3 2 3 3 1 2 ...
##  $ TRACH_Adm         : Factor w/ 4 levels "","NO","SI","SIS": 3 3 2 3 3 3 3 3 2 3 ...
##  $ TRACH_Dis         : Factor w/ 3 levels "","NO","SI": 3 2 2 2 3 3 3 3 2 2 ...
##  $ DateOfDischarge   : Factor w/ 144 levels "02/01/2013","02/02/2012",..: 67 16 12 53 63 69 23 136 37 144 ...
##  $ ModeOfDischarge   : Factor w/ 19 levels "AL LDS","AL LDS VIC RES",..: 15 3 6 17 17 5 5 17 16 8 ...
##  $ LastConscStatus   : Factor w/ 4 levels "EMERGED","EMERGED ",..: 3 1 1 3 3 4 4 4 1 1 ...
##  $ Status            : Factor w/ 2 levels "ALIVE","DECEASED": 1 1 1 1 1 1 2 1 1 1 ...
##  $ LastTime          : int  19 15 3 27 23 14 22 20 3 3 ...
##  $ DateOfCRS1        : Factor w/ 152 levels "01/02/2012","01/07/2010",..: 43 149 10 39 151 112 22 66 117 54 ...

Data transformation

Date transformation

CRS_proc$DateOfEvent <- as.Date.factor(CRS_proc$DateOfEvent,format="%d/%m/%Y")
CRS_proc$DateOfAdmission <- as.Date.factor(CRS_proc$DateOfAdmission,format="%d/%m/%Y")
CRS_proc$DateOfDischarge <- as.Date.factor(CRS_proc$DateOfDischarge,format="%d/%m/%Y")
CRS_proc$DateOfCRS1<- as.Date.factor(CRS_proc$DateOfCRS1,format="%d/%m/%Y")
# View(CRS_proc)

Categorical Variables Transformation

  • Etiology is stratified as: TCE, Vascular, Anoxia or others (infections, neoplastic)
require(plyr)

CRS_proc$Etiology <- as.character(CRS_proc$Etiology)
CRS_proc[grep("TCE",CRS_proc$Etiology),"Etiology"] <- "TCE"
CRS_proc[grep("Vasc",CRS_proc$Etiology),"Etiology"] <- "Vascular"
CRS_proc[grep("Anos",CRS_proc$Etiology),"Etiology"] <- "Anoxia"
CRS_proc[grep("(Inf|Neo)",CRS_proc$Etiology),"Etiology"] <- "Others"
CRS_proc$Etiology <- as.factor(CRS_proc$Etiology)
  • Origin Department is stratified as: ICU or NCH
CRS_proc$DipOrigin <- as.character(CRS_proc$DipOrigin)
CRS_proc[grep("^Rian",CRS_proc$DipOrigin),"DipOrigin"] <- "ICU"
CRS_proc[!(CRS_proc$DipOrigin=="ICU"),"DipOrigin"] <- "NCH"
CRS_proc$DipOrigin <- as.factor(CRS_proc$DipOrigin)
  • Change Craniectomy and Cranioplasty values as yes/no
CRS_proc$Craniectomy <- revalue(CRS_proc$Craniectomy,c("NO"="no","SI"="yes"))

CRS_proc$Cranioplasty <- revalue(CRS_proc$Cranioplasty,c("NO"="no","Progr NO"="no","Programm"="yes","SI"="yes"))
CRS_proc[CRS_proc$Cranioplasty=="","Cranioplasty"] <- "no"
CRS_proc$Cranioplasty <- factor(CRS_proc$Cranioplasty)
  • Change ComplicationsNCH empty values in no
CRS_proc$ComplicationsNCH <- as.factor(sapply(CRS_proc$ComplicationsNCH, function(x){ 
  w <- as.character(x) 
  ifelse(w == "", w <- "no", w <- "yes")  
  return(w) } ))
  • Operations is stratified as: DVP, others or no
CRS_proc$Operations <- revalue(CRS_proc$Operations,c("Trasf X DVP"="DVP","Embolizzazione"="others","III cist-ventr-st"="others","Int NCH"="others", "NO DVP"="no"))
CRS_proc[CRS_proc$Operations=="","Operations"] <- "no"
CRS_proc$Operations <- factor(CRS_proc$Operations)
  • OtherComplications is stratified as: Blindness, CDI (Central Diabetes Insipidus), CVD (Cardio-Vascular Disease), Infection, Neuro (Neurological), Respiratory Failure, Tracheotoemy linked, others or none
CRS_proc$OtherComplications <- as.character(CRS_proc$OtherComplications)
CRS_proc[grep("[Ii]nf.*[Cc]er",CRS_proc$OtherComplications),"OtherComplications"] <- "Cerebral Infection"
CRS_proc[grep("[Ii]ns.*[Rr]es",CRS_proc$OtherComplications),"OtherComplications"] <- "Respiratory Failure"
CRS_proc[grep("[Ii]ns.*[Cc]ar",CRS_proc$OtherComplications),"OtherComplications"] <- "Heart Failure"
CRS_proc[grep("[Cc]ec",CRS_proc$OtherComplications),"OtherComplications"] <- "Blindness"
CRS_proc[grep("([Ii]nf|ite$)",CRS_proc$OtherComplications),"OtherComplications"] <- "Infection"
CRS_proc[grep("[Dd]ia.*[Ii]ns",CRS_proc$OtherComplications),"OtherComplications"] <- "CDI"


CRS_proc$OtherComplications <- as.character(CRS_proc$OtherComplications)
CRS_proc[grep("[Ii]nf.*[Cc]er",CRS_proc$OtherComplications),"OtherComplications"] <- "Cerebral Infection"
CRS_proc[grep("[Ii]ns.*[Rr]es",CRS_proc$OtherComplications),"OtherComplications"] <- "Respiratory Failure"
CRS_proc[grep("[Ii]ns.*[Cc]ar",CRS_proc$OtherComplications),"OtherComplications"] <- "Heart Failure"
CRS_proc[grep("[Cc]ec",CRS_proc$OtherComplications),"OtherComplications"] <- "Blindness"
CRS_proc[grep("([Ii]nf|ite$)",CRS_proc$OtherComplications),"OtherComplications"] <- "Infection"
CRS_proc[grep("[Dd]ia.*[Ii]ns",CRS_proc$OtherComplications),"OtherComplications"] <- "CDI"

CRS_proc[CRS_proc$OtherComplications=="","OtherComplications"] <- "none"

CRS_proc$OtherComplications <- as.factor(CRS_proc$OtherComplications)

CRS_proc$OtherComplications <- revalue(CRS_proc$OtherComplications,c("Heart Failure"="CVD","Aritmia Card"="CVD","Arresto C-R"="CVD","Ins Renale"="CVD"))
CRS_proc$OtherComplications <- revalue(CRS_proc$OtherComplications,c("Afasia"="Neuro","Spasticità"="Neuro","Paraplegia"="Neuro"))
CRS_proc$OtherComplications <- revalue(CRS_proc$OtherComplications,c("Fist TE"="Tracheotomy linked","Fistola TE"="Tracheotomy linked","Gran Trach"="Tracheotomy linked","Granulaz Trac"="Tracheotomy linked","Stenosi trac"="Tracheotomy linked"))

CRS_proc$OtherComplications <- as.character(CRS_proc$OtherComplications)
CRS_proc[!(CRS_proc$OtherComplications %in% c("Neuro","Blindness","CDI","CVD","Tracheotomy linked","Infection","none","Respiratory Failure")),"OtherComplications"] <- "others"
CRS_proc$OtherComplications <- as.factor(CRS_proc$OtherComplications)
  • Fix some other yes/no values
CRS_proc$Dysautonomia <- as.factor(sapply(CRS_proc$Dysautonomia, function(x){ w <- as.character(x) 
                                                                              ifelse(w == "", w <- "no", w <- "yes")                    
                                                                              return(w) } ))

CRS_proc$SNG_Adm <- as.factor(sapply(CRS_proc$SNG_Adm, function(x){ w <- as.character(x) 
                                                  ifelse(w == "", w <- "no", w <- "yes")                    
                                                  return(w) } ))

CRS_proc$SNG_Dis <- as.factor(sapply(CRS_proc$SNG_Dis, function(x){ w <- as.character(x) 
                                              ifelse(w == "SNG", w <- "yes", w <- "no")                    
                                                                    return(w) } ))

CRS_proc$PEG_Adm <- as.factor(sapply(CRS_proc$PEG_Adm, function(x){ w <- as.character(x) 
                                              ifelse(w == "SI", w <- "yes", w <- "no")                    
                                                                    return(w) } ))

CRS_proc$PEG_Dis <- as.factor(sapply(CRS_proc$PEG_Dis, function(x){ w <- as.character(x) 
                                              ifelse(w == "SI", w <- "yes", w <- "no")                    
                                                                    return(w) } ))

CRS_proc$TRACH_Adm <- revalue(CRS_proc$TRACH_Adm,c("NO"="no","SI"="yes","SIS"="yes"))
CRS_proc$TRACH_Adm <- as.factor(sapply(CRS_proc$TRACH_Adm, function(x){ w <- as.character(x) 
                                              ifelse(w == "", w <- "no", w)                    
                                                                      return(w) } ))

CRS_proc$TRACH_Dis <- revalue(CRS_proc$TRACH_Dis,c("NO"="no","SI"="yes"))
CRS_proc$TRACH_Dis <- as.factor(sapply(CRS_proc$PEG_Adm, function(x){ w <- as.character(x) 
                                              ifelse(w == "", w <- "no", w)                    
                                                                    return(w) } ))
  • ModeOfDischarge is stratified as: Deceased, Home, LDS or NCH
CRS_proc$ModeOfDischarge <- as.character(CRS_proc$ModeOfDischarge)
CRS_proc[grep("(LDS|SUAP|HOSP|RIAB)",CRS_proc$ModeOfDismission),"ModeOfDismission"] <- "LDS"
CRS_proc[grep("(118|DECESSO)",CRS_proc$ModeOfDismission),"ModeOfDismission"] <- "Deceased"
CRS_proc[grep("DOMICILIO",CRS_proc$ModeOfDismission),"ModeOfDismission"] <- "Home"
CRS_proc[grep("NCH",CRS_proc$ModeOfDismission),"ModeOfDismission"] <- "NCH"
CRS_proc$ModeOfDismission <- as.factor(CRS_proc$ModeOfDismission)
  • Fix CRS values
x <- as.factor(sapply(as.list(CRS_proc[,29:89]),function(x) { w <- as.character(x)
                                          w[grep("(EMERGED|SV|SMC|DECEASED)",w)] <- NA
                                          ifelse(w == "", w[w==""] <- NA, w)
                                          return(w) }))
CRS_proc[,29:89] <- x
rm(x)
CRS_proc[,29:89] <- lapply(CRS_proc[,29:89] , as.integer)

x <- sapply(as.list(CRS_proc[,90:150]),function(x) { w <- as.character(x)
                                          ifelse(w == "", w[w==""] <- NA, w)
                                          return(w) })
CRS_proc[,90:150] <- x
rm(x)
CRS_proc[CRS_proc$Consc_1=="EMERGED","Consc_1"] <- "SMC"
CRS_proc$Consc_1 <- factor(CRS_proc$Consc_1)
CRS_proc[,90:150] <- lapply(CRS_proc[,90:150] , factor)

CRS_proc <- CRS_proc[,1:150]

Data Analysis

Classification Analysis

Analysis of prediction performance of Logistic Model vs. Classification Tree for the classification of Emerged/not Emerged patients

Define Complications as CardioRespiratory or others

CRS_proc$Deceased <- as.integer(CRS_proc$Status) - 1
CRS_proc[CRS_proc$Deceased==0 & CRS_proc$GOS==1,"Deceased"] <- 1
CRS_proc$Etiology <- relevel(CRS_proc$Etiology,"TCE")
CRS_proc$Consc_1 <- relevel(CRS_proc$Consc_1,"SV")
CRS_proc$Complications <- revalue(CRS_proc$OtherComplications,c("Blindness"="others","CDI"="others","Neuro"="others","Tracheotomy linked"="others","CVD"="CardioRespiratory","Respiratory Failure"="CardioRespiratory"))
CRS_proc$Complications <- factor(CRS_proc$Complications)
CRS_proc$Complications <- relevel(CRS_proc$Complications,"none")
names(CRS_proc)[29] <- "CRS_Adm"

Create Emersion variable

CRS_proc$Emersion <- ifelse(CRS_proc$LastConscStatus=="EMERGED",1,0)
CRS_proc$Emersion_fac <- factor(CRS_proc$Emersion,levels=0:1,labels=c("not Emerged","Emerged"))

Best Classification Tree 10 time 10-Fold-CrossValidation

set.seed(1)
class.control = trainControl(method = "repeatedCV", number = 10, repeats = 10, summaryFunction = twoClassSummary, classProbs = T, verboseIter = FALSE, savePredictions = TRUE)# 10-fold CV


tree.CRS = train(Emersion_fac ~ Etiology + Complications + + DRS_Adm + CRS_Adm + Age  + Consc_1 + PEG_Adm, data=CRS_proc, method = "rpart", trControl = class.control, tuneLength = 10)

Classification Tree Plot

Best Logistic Regression Model 10 time 10-Fold-CrossValidation

log.CRS = train(Emersion_fac ~ Etiology + Complications  + DRS_Adm + CRS_Adm + Age + Consc_1, data=CRS_proc, method = "glm", trControl = class.control, tuneLength = 30)

ROC analysis: Logistic model performs much better than Trees

m3 = predict(tree.CRS, CRS_proc)
predTree.CRS <- tree.CRS$pred
names(predTree.CRS)[4] <- "not_Emerged" 
probsTree.CRS <- summarise(group_by(predTree.CRS, rowIndex),Emerged=mean(Emerged),not_Emerged=mean(not_Emerged))[,2:3]

predLog.CRS <- log.CRS$pred
names(predLog.CRS)[3] <- "not_Emerged" 
probsLog.CRS <- summarise(group_by(predLog.CRS, rowIndex),Emerged=mean(Emerged),not_Emerged=mean(not_Emerged))[,2:3]


rocTree.CRS <- roc(response = CRS_proc$Emersion_fac,predictor = probsTree.CRS$Emerged, levels = rev(levels(CRS_proc$Emersion_fac)))
rocTree.CRS
## 
## Call:
## roc.default(response = CRS_proc$Emersion_fac, predictor = probsTree.CRS$Emerged,     levels = rev(levels(CRS_proc$Emersion_fac)))
## 
## Data: probsTree.CRS$Emerged in 75 controls (CRS_proc$Emersion_fac Emerged) > 81 cases (CRS_proc$Emersion_fac not Emerged).
## Area under the curve: 0.6436
rocLog.CRS <- roc(response = CRS_proc$Emersion_fac,predictor = probsLog.CRS$Emerged, levels = rev(levels(CRS_proc$Emersion_fac)))
rocLog.CRS
## 
## Call:
## roc.default(response = CRS_proc$Emersion_fac, predictor = probsLog.CRS$Emerged,     levels = rev(levels(CRS_proc$Emersion_fac)))
## 
## Data: probsLog.CRS$Emerged in 75 controls (CRS_proc$Emersion_fac Emerged) > 81 cases (CRS_proc$Emersion_fac not Emerged).
## Area under the curve: 0.7913

Survival Analysis

Analysis of mortality

Predictive analysis of factors associated with patient mortality in the first 70 weeks after admission

Kaplan-Meier curves by baseline Consciousness state (SV vs SMC): SMC patients show higher mortaity risk (!)

Kaplan-Meier curves by Complications: Cardio-Respiratory and Infection complication seem to be associated with higher mortality risk

Kaplan-Meier curves by Etiology: No diffeences in mortality by Etiology

Cox Regression Models for Mortality vs. Etiology, Complications and baseline CRS adjusted by Age: Cardio-Respiratory and Infection complication, as well as Vascular Etiology and baseline CRS seem to be all positively associated with higher mortality risk

summary(coxph(Surv(LastTime,Deceased) ~ Etiology + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Deceased) ~ Etiology + Age, data = CRS_proc)
## 
##   n= 156, number of events= 18 
## 
##                        coef  exp(coef)   se(coef)      z Pr(>|z|)  
## EtiologyAnoxia   -9.949e-01  3.698e-01  1.103e+00 -0.902   0.3669  
## EtiologyOthers   -1.604e+01  1.077e-07  5.671e+03 -0.003   0.9977  
## EtiologyVascular  1.923e-01  1.212e+00  5.981e-01  0.322   0.7478  
## Age               2.736e-02  1.028e+00  1.649e-02  1.659   0.0972 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                  exp(coef) exp(-coef) lower .95 upper .95
## EtiologyAnoxia   3.698e-01  2.704e+00    0.0426     3.210
## EtiologyOthers   1.077e-07  9.285e+06    0.0000       Inf
## EtiologyVascular 1.212e+00  8.250e-01    0.3754     3.914
## Age              1.028e+00  9.730e-01    0.9950     1.062
## 
## Concordance= 0.663  (se = 0.074 )
## Rsquare= 0.046   (max possible= 0.641 )
## Likelihood ratio test= 7.29  on 4 df,   p=0.1214
## Wald test            = 5.65  on 4 df,   p=0.2266
## Score (logrank) test = 6.63  on 4 df,   p=0.1568
summary(coxph(Surv(LastTime,Deceased) ~ CRS_Adm + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Deceased) ~ CRS_Adm + Age, data = CRS_proc)
## 
##   n= 156, number of events= 18 
## 
##            coef exp(coef) se(coef)     z Pr(>|z|)  
## CRS_Adm 0.15719   1.17022  0.07778 2.021   0.0433 *
## Age     0.02726   1.02763  0.01432 1.904   0.0569 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##         exp(coef) exp(-coef) lower .95 upper .95
## CRS_Adm     1.170     0.8545    1.0047     1.363
## Age         1.028     0.9731    0.9992     1.057
## 
## Concordance= 0.651  (se = 0.074 )
## Rsquare= 0.055   (max possible= 0.641 )
## Likelihood ratio test= 8.91  on 2 df,   p=0.01164
## Wald test            = 9.39  on 2 df,   p=0.009163
## Score (logrank) test = 9.99  on 2 df,   p=0.006778
summary(coxph(Surv(LastTime,Deceased) ~ Complications + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Deceased) ~ Complications + Age, 
##     data = CRS_proc)
## 
##   n= 156, number of events= 18 
## 
##                                    coef exp(coef) se(coef)     z Pr(>|z|)    
## Complicationsothers             0.40733   1.50280  1.01625 0.401 0.688553    
## ComplicationsCardioRespiratory  2.74634  15.58544  0.78018 3.520 0.000431 ***
## ComplicationsInfection          2.04063   7.69545  0.88567 2.304 0.021220 *  
## Age                             0.01974   1.01994  0.01456 1.356 0.175137    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                exp(coef) exp(-coef) lower .95 upper .95
## Complicationsothers                1.503    0.66542    0.2051    11.014
## ComplicationsCardioRespiratory    15.585    0.06416    3.3777    71.914
## ComplicationsInfection             7.695    0.12995    1.3563    43.664
## Age                                1.020    0.98045    0.9912     1.049
## 
## Concordance= 0.831  (se = 0.074 )
## Rsquare= 0.159   (max possible= 0.641 )
## Likelihood ratio test= 27.08  on 4 df,   p=1.915e-05
## Wald test            = 23.65  on 4 df,   p=9.375e-05
## Score (logrank) test = 38.27  on 4 df,   p=9.841e-08
summary(coxph(Surv(LastTime,Deceased) ~ Complications +  Etiology + CRS_Adm + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Deceased) ~ Complications + Etiology + 
##     CRS_Adm + Age, data = CRS_proc)
## 
##   n= 156, number of events= 18 
## 
##                                      coef  exp(coef)   se(coef)      z Pr(>|z|)    
## Complicationsothers             4.795e-01  1.615e+00  1.018e+00  0.471   0.6377    
## ComplicationsCardioRespiratory  3.407e+00  3.017e+01  8.181e-01  4.164 3.12e-05 ***
## ComplicationsInfection          2.141e+00  8.504e+00  8.895e-01  2.406   0.0161 *  
## EtiologyAnoxia                 -9.493e-01  3.870e-01  1.200e+00 -0.791   0.4288    
## EtiologyOthers                 -1.514e+01  2.657e-07  7.297e+03 -0.002   0.9983    
## EtiologyVascular                1.531e+00  4.621e+00  6.673e-01  2.294   0.0218 *  
## CRS_Adm                         1.983e-01  1.219e+00  9.078e-02  2.184   0.0289 *  
## Age                            -4.785e-04  9.995e-01  1.659e-02 -0.029   0.9770    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                exp(coef) exp(-coef) lower .95 upper .95
## Complicationsothers            1.615e+00  6.191e-01   0.21950    11.887
## ComplicationsCardioRespiratory 3.017e+01  3.315e-02   6.07003   149.935
## ComplicationsInfection         8.504e+00  1.176e-01   1.48745    48.616
## EtiologyAnoxia                 3.870e-01  2.584e+00   0.03685     4.065
## EtiologyOthers                 2.657e-07  3.763e+06   0.00000       Inf
## EtiologyVascular               4.621e+00  2.164e-01   1.24947    17.089
## CRS_Adm                        1.219e+00  8.201e-01   1.02057     1.457
## Age                            9.995e-01  1.000e+00   0.96753     1.033
## 
## Concordance= 0.877  (se = 0.074 )
## Rsquare= 0.227   (max possible= 0.641 )
## Likelihood ratio test= 40.12  on 8 df,   p=3.049e-06
## Wald test            = 32.27  on 8 df,   p=8.328e-05
## Score (logrank) test = 49.28  on 8 df,   p=5.609e-08

Survival Tree model for mortality: Complications and DRS at admission are key factors for predicting mortality

Emersion Survival Analysis

Predictive analysis of factors associated with patient emersion (risk = probability of emersion)

Kaplan-Meier curves by baseline Consciousness state (SV vs SMC): SMC patients have higher rate of Emersion

Kaplan-Meier curves by Complications: No clear differences in rate of Emersion by complications

Kaplan-Meier curves by Etiology: Anoxia seems to be associated with lower rate of Emersion

Cox Regression Models for Emersion vs. Etiology, Complications and baseline CRS (Category or Numeric) adjusted by Age: After adjustemt by Age, Cardio-Respiratory and Infection complication, as well as Anoxia Etiology are associated wit lower rate of Emersion, while baseline CRS with higher rate (!).

summary(coxph(Surv(LastTime,Emersion) ~ Etiology + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Emersion) ~ Etiology + Age, data = CRS_proc)
## 
##   n= 156, number of events= 75 
## 
##                       coef exp(coef)  se(coef)      z Pr(>|z|)  
## EtiologyAnoxia   -1.650237  0.192004  0.739360 -2.232   0.0256 *
## EtiologyOthers    0.330159  1.391189  0.742827  0.444   0.6567  
## EtiologyVascular  0.265718  1.304367  0.294277  0.903   0.3666  
## Age               0.006084  1.006102  0.007738  0.786   0.4318  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                  exp(coef) exp(-coef) lower .95 upper .95
## EtiologyAnoxia       0.192     5.2082   0.04508    0.8178
## EtiologyOthers       1.391     0.7188   0.32441    5.9660
## EtiologyVascular     1.304     0.7667   0.73267    2.3221
## Age                  1.006     0.9939   0.99096    1.0215
## 
## Concordance= 0.62  (se = 0.038 )
## Rsquare= 0.094   (max possible= 0.986 )
## Likelihood ratio test= 15.38  on 4 df,   p=0.003967
## Wald test            = 9.72  on 4 df,   p=0.04545
## Score (logrank) test = 12  on 4 df,   p=0.01732
summary(coxph(Surv(LastTime,Emersion) ~ CRS_Adm + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Emersion) ~ CRS_Adm + Age, data = CRS_proc)
## 
##   n= 156, number of events= 75 
## 
##             coef exp(coef) se(coef)     z Pr(>|z|)    
## CRS_Adm 0.265976  1.304704 0.034378 7.737 1.02e-14 ***
## Age     0.008068  1.008100 0.006277 1.285    0.199    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##         exp(coef) exp(-coef) lower .95 upper .95
## CRS_Adm     1.305     0.7665    1.2197     1.396
## Age         1.008     0.9920    0.9958     1.021
## 
## Concordance= 0.782  (se = 0.038 )
## Rsquare= 0.319   (max possible= 0.986 )
## Likelihood ratio test= 59.83  on 2 df,   p=1.019e-13
## Wald test            = 62.94  on 2 df,   p=2.154e-14
## Score (logrank) test = 72.42  on 2 df,   p=2.22e-16
summary(coxph(Surv(LastTime,Emersion) ~ Complications + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Emersion) ~ Complications + Age, 
##     data = CRS_proc)
## 
##   n= 156, number of events= 75 
## 
##                                     coef exp(coef)  se(coef)      z Pr(>|z|)  
## Complicationsothers            -0.353661  0.702113  0.281935 -1.254   0.2097  
## ComplicationsCardioRespiratory -0.826442  0.437603  0.436509 -1.893   0.0583 .
## ComplicationsInfection         -1.424392  0.240655  0.605745 -2.351   0.0187 *
## Age                             0.007131  1.007156  0.007300  0.977   0.3286  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                exp(coef) exp(-coef) lower .95 upper .95
## Complicationsothers               0.7021     1.4243   0.40404    1.2201
## ComplicationsCardioRespiratory    0.4376     2.2852   0.18600    1.0295
## ComplicationsInfection            0.2407     4.1553   0.07341    0.7889
## Age                               1.0072     0.9929   0.99285    1.0217
## 
## Concordance= 0.627  (se = 0.038 )
## Rsquare= 0.084   (max possible= 0.986 )
## Likelihood ratio test= 13.73  on 4 df,   p=0.008193
## Wald test            = 11.27  on 4 df,   p=0.02374
## Score (logrank) test = 12.39  on 4 df,   p=0.01469
summary(coxph(Surv(LastTime,Emersion) ~ Complications +  Etiology + CRS_Adm + Age, CRS_proc))
## Call:
## coxph(formula = Surv(LastTime, Emersion) ~ Complications + Etiology + 
##     CRS_Adm + Age, data = CRS_proc)
## 
##   n= 156, number of events= 75 
## 
##                                     coef exp(coef)  se(coef)      z Pr(>|z|)    
## Complicationsothers            -0.288234  0.749586  0.297057 -0.970   0.3319    
## ComplicationsCardioRespiratory -0.976756  0.376531  0.454219 -2.150   0.0315 *  
## ComplicationsInfection         -1.268838  0.281158  0.610308 -2.079   0.0376 *  
## EtiologyAnoxia                 -1.550739  0.212091  0.746912 -2.076   0.0379 *  
## EtiologyOthers                 -0.436387  0.646368  0.781133 -0.559   0.5764    
## EtiologyVascular                0.148335  1.159901  0.314418  0.472   0.6371    
## CRS_Adm                         0.267545  1.306753  0.036157  7.400 1.37e-13 ***
## Age                             0.003492  1.003498  0.008330  0.419   0.6751    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                exp(coef) exp(-coef) lower .95 upper .95
## Complicationsothers               0.7496     1.3341   0.41876    1.3418
## ComplicationsCardioRespiratory    0.3765     2.6558   0.15459    0.9171
## ComplicationsInfection            0.2812     3.5567   0.08501    0.9299
## EtiologyAnoxia                    0.2121     4.7150   0.04906    0.9168
## EtiologyOthers                    0.6464     1.5471   0.13982    2.9880
## EtiologyVascular                  1.1599     0.8621   0.62631    2.1481
## CRS_Adm                           1.3068     0.7653   1.21735    1.4027
## Age                               1.0035     0.9965   0.98725    1.0200
## 
## Concordance= 0.812  (se = 0.038 )
## Rsquare= 0.409   (max possible= 0.986 )
## Likelihood ratio test= 82.15  on 8 df,   p=1.799e-14
## Wald test            = 74.91  on 8 df,   p=5.135e-13
## Score (logrank) test = 92.23  on 8 df,   p=1.11e-16

Survival Tree model for emersion: DRS and Consciousness state at admission are key factors for predicting emersion rate

Conclusions

  1. Logistic model performs better than trees in classificating patients as Emerged or Not;
  2. SMC state at admission as well as cardio-respiratory and infection complication are associated with a higher mortality risk during the admission period;
  3. Admission DRS, more than CRS seems to be implicated in the prediction of both mortality and emersion rate.