#Prepare: packages, data

library("foreign")
library("survival")

require("moonBook")
## Loading required package: moonBook
require("ztable")
## Loading required package: ztable
## Welcome to package ztable ver 0.2.0
require("magrittr")
## Loading required package: magrittr
options(ztable.type="html")

#read data and group for variable

Read Data

data=read.csv("D:/data/data csv.csv")
head(data)
##   ID Dossier age age_code Sexe sex_code Tabagisme localisation   Origin
## 1  1  983188  49        0    F        0         1            1   Kidney
## 2  2  821908  67        1    F        0         0            1   Breast
## 3  3  390270  65        1    F        0         1            1     Lung
## 4  4  938314  59        0    M        1         1            1 Prostate
## 5  5 7049669  69        1    F        0         0            1   Breast
## 6  6 7149632  56        0    M        1         1            1   Kidney
##   Pathologie Apparition ASIAPreOp AmbulationPreOP fctSphincter approcheChx
## 1  Carcinoma          2         2               1            1           1
## 2  Carcinoma          1         3               1            2           3
## 3  Carcinoma          1         2               2            2           2
## 4  Carcinoma          1         2               0            2           1
## 5  Carcinoma          1         3               2            2           1
## 6  Carcinoma          2         2               2            2           3
##   ScoreASA    DateChx DureeChx PertesSang MedicalComplic SurgicalComplic
## 1        3 22/11/2017      278       1200              0               0
## 2        3 27/09/2017      479        700              0               0
## 3        3 28/07/2016      120        200              1               0
## 4        3   6/2/2016      115        400              0               0
## 5        3  9/10/2015      155        200              0               0
## 6        3  7/11/2014      320       1500              1               0
##   WoundInfection AmbulationPO Improvement.of.ambulation PainImprovPO ASIA_PO
## 1              1            1                         0            3       4
## 2              0            1                         0            3       4
## 3              0            1                         1            3       4
## 4              0            1                         1            3       4
## 5              0            2                         0            3       4
## 6              0            0                         2            1       0
##   Improvement.of.ASIA.score DureeSejour RoRxPreOP RoRxPO SystemicTherapyPO
## 1                         1           5         0      1                 1
## 2                        NA           9         1      1                 1
## 3                         1          16         0      0                 1
## 4                         1           6         0      1                 1
## 5                        NA           5         0      1                 1
## 6                         2           8         0      0                 0
##   Tokuhashi Tokuhashi_cat Deces  dateDeces  dernierRV SurviePosOpMOIS
## 1         9             2     0 31/10/2019 24/05/2019           23.60
## 2        13             3     0 31/10/2019   9/2/2018           25.47
## 3         5             1     1  12/8/2017  12/8/2017           12.67
## 4         7             1     1 20/05/2016 20/05/2016            3.47
## 5        12             3     1 16/04/2016 30/11/2015            6.33
## 6         7             1     1  8/11/2014  8/11/2014            0.03
##   DureeSuivi DernSuiviDeces
## 1      18.27           5.33
## 2       4.50          20.97
## 3      12.67           0.00
## 4       3.47           0.00
## 5       1.73           4.60
## 6       0.03           0.00
names(data) #name of variables
##  [1] "ID"                        "Dossier"                  
##  [3] "age"                       "age_code"                 
##  [5] "Sexe"                      "sex_code"                 
##  [7] "Tabagisme"                 "localisation"             
##  [9] "Origin"                    "Pathologie"               
## [11] "Apparition"                "ASIAPreOp"                
## [13] "AmbulationPreOP"           "fctSphincter"             
## [15] "approcheChx"               "ScoreASA"                 
## [17] "DateChx"                   "DureeChx"                 
## [19] "PertesSang"                "MedicalComplic"           
## [21] "SurgicalComplic"           "WoundInfection"           
## [23] "AmbulationPO"              "Improvement.of.ambulation"
## [25] "PainImprovPO"              "ASIA_PO"                  
## [27] "Improvement.of.ASIA.score" "DureeSejour"              
## [29] "RoRxPreOP"                 "RoRxPO"                   
## [31] "SystemicTherapyPO"         "Tokuhashi"                
## [33] "Tokuhashi_cat"             "Deces"                    
## [35] "dateDeces"                 "dernierRV"                
## [37] "SurviePosOpMOIS"           "DureeSuivi"               
## [39] "DernSuiviDeces"

##explaination

###subset dataset -Independent vars:

a <- subset(data, select=c(localisation, sex_code, age_code, Tabagisme, ASIAPreOp, ASIA_PO, Tokuhashi_cat,AmbulationPreOP, AmbulationPO, RoRxPO,SystemicTherapyPO, Improvement.of.ambulation, SurviePosOpMOIS, Deces))

##Tabl3

mytable(localisation+Improvement.of.ambulation~age_code+Tabagisme+ ASIAPreOp+ ASIA_PO+ Tokuhashi_cat+AmbulationPreOP+ AmbulationPO+ RoRxPO+SystemicTherapyPO+sex_code,data=a) %>% deleteRows(3)
## 
##                           Descriptive Statistics stratified by 'localisation' and 'Improvement.of.ambulation'                         
## _______________________________________________________________________________________________________________________________________ 
##                                        1                                       2                                       3                   
##                    -------------------------------------- -------------------------------------- -------------------------------------- 
##                        0          1          2        p       0          1          2        p       0          1          2        p  
##                      (N=30)     (N=10)     (N=7)           (N=58)     (N=25)     (N=13)          (N=23)     (N=15)     (N=10)       
## --------------------------------------------------------------------------------------------------------------------------------------- 
##  age_code                                           0.316                                  0.864                                  0.947
##    - 0             12 (40.0%) 5 (50.0%)  5 (71.4%)        22 (37.9%) 8 (32.0%)  5 (38.5%)        10 (43.5%) 7 (46.7%)  4 (40.0%)       
##  Tabagisme                                          0.395                                  0.571                                  0.002
##    - 0             16 (53.3%) 3 (30.0%)  4 (57.1%)        36 (62.1%) 15 (60.0%) 6 (46.2%)        20 (87.0%) 6 (40.0%)  9 (90.0%)       
##    - 1             14 (46.7%) 7 (70.0%)  3 (42.9%)        22 (37.9%) 10 (40.0%) 7 (53.8%)        3 (13.0%)  9 (60.0%)  1 (10.0%)       
##  ASIAPreOp                                                                                 0.000                                       
##    - 0              0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)       1 ( 1.7%)   0 ( 0.0%)  0 ( 0.0%)        0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)      
##    - 1              0 ( 0.0%) 2 (20.0%)   0 ( 0.0%)       2 ( 3.4%)  11 (44.0%)  0 ( 0.0%)       3 (13.0%)  4 (26.7%)  1 (10.0%)       
##    - 2             12 (40.0%) 5 (50.0%)  5 (71.4%)        26 (44.8%) 9 (36.0%)  5 (38.5%)        11 (47.8%) 8 (53.3%)  5 (50.0%)       
##    - 3             18 (60.0%) 3 (30.0%)  2 (28.6%)        29 (50.0%) 5 (20.0%)  8 (61.5%)        9 (39.1%)  3 (20.0%)  4 (40.0%)       
##  ASIA_PO                                                                                   0.281                                       
##    - 0              0 ( 0.0%)  0 ( 0.0%) 1 (14.3%)        1 ( 1.7%)   0 ( 0.0%)  0 ( 0.0%)        0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)      
##    - 1              0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)       1 ( 1.7%)   0 ( 0.0%)  0 ( 0.0%)        0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)      
##    - 2              0 ( 0.0%)  0 ( 0.0%)  0 ( 0.0%)       1 ( 1.7%)   0 ( 0.0%)  0 ( 0.0%)       1 ( 4.3%)   0 ( 0.0%)  0 ( 0.0%)      
##    - 3             8 (26.7%)  4 (40.0%)  2 (28.6%)        17 (29.3%) 15 (60.0%) 3 (23.1%)        6 (26.1%)  8 (53.3%)  5 (50.0%)       
##    - 4             22 (73.3%) 6 (60.0%)  4 (57.1%)        38 (65.5%) 10 (40.0%) 10 (76.9%)       16 (69.6%) 7 (46.7%)  5 (50.0%)       
##  Tokuhashi_cat                                      0.144                                  0.068                                  0.208
##    - 1             9 (30.0%)  5 (50.0%)  3 (42.9%)        20 (34.5%) 15 (60.0%) 7 (53.8%)        8 (34.8%)  6 (40.0%)  3 (30.0%)       
##    - 2             9 (30.0%)  4 (40.0%)  4 (57.1%)        24 (41.4%) 8 (32.0%)  6 (46.2%)        5 (21.7%)  5 (33.3%)  6 (60.0%)       
##    - 3             12 (40.0%) 1 (10.0%)   0 ( 0.0%)       14 (24.1%) 2 ( 8.0%)   0 ( 0.0%)       10 (43.5%) 4 (26.7%)  1 (10.0%)       
##  AmbulationPreOP                                    0.000                                  0.000                                  0.000
##    - 0             1 ( 3.3%)  6 (60.0%)   0 ( 0.0%)       4 ( 6.9%)  17 (68.0%)  0 ( 0.0%)       1 ( 4.3%)  13 (86.7%)  0 ( 0.0%)      
##    - 1             24 (80.0%)  0 ( 0.0%) 5 (71.4%)        40 (69.0%)  0 ( 0.0%) 12 (92.3%)       13 (56.5%)  0 ( 0.0%) 9 (90.0%)       
##    - 2             5 (16.7%)  4 (40.0%)  2 (28.6%)        14 (24.1%) 8 (32.0%)  1 ( 7.7%)        9 (39.1%)  2 (13.3%)  1 (10.0%)       
##  AmbulationPO                                       0.000                                  0.000                                  0.013
##    - 0             1 ( 3.3%)   0 ( 0.0%) 4 (57.1%)        4 ( 6.9%)   0 ( 0.0%) 1 ( 7.7%)        1 ( 4.3%)   0 ( 0.0%) 2 (20.0%)       
##    - 1             24 (80.0%) 6 (60.0%)   0 ( 0.0%)       40 (69.0%) 11 (44.0%)  0 ( 0.0%)       13 (56.5%) 5 (33.3%)   0 ( 0.0%)      
##    - 2             5 (16.7%)  4 (40.0%)  3 (42.9%)        14 (24.1%) 14 (56.0%) 12 (92.3%)       9 (39.1%)  10 (66.7%) 8 (80.0%)       
##  RoRxPO                                             0.000                                  0.135                                  0.512
##    - 0             5 (16.7%)  4 (40.0%)  7 (100.0%)       15 (26.3%) 4 (16.0%)  6 (46.2%)        3 (13.0%)  3 (20.0%)  3 (30.0%)       
##    - 1             25 (83.3%) 6 (60.0%)   0 ( 0.0%)       42 (73.7%) 21 (84.0%) 7 (53.8%)        20 (87.0%) 12 (80.0%) 7 (70.0%)       
##  SystemicTherapyPO                                  0.664                                  0.220                                  0.443
##    - 0             12 (40.0%) 5 (50.0%)  4 (57.1%)        25 (43.1%) 13 (52.0%) 9 (69.2%)        11 (47.8%) 7 (46.7%)  7 (70.0%)       
##    - 1             18 (60.0%) 5 (50.0%)  3 (42.9%)        33 (56.9%) 12 (48.0%) 4 (30.8%)        12 (52.2%) 8 (53.3%)  3 (30.0%)       
##  sex_code                                           0.407                                  0.584                                  0.443
##    - 0             14 (46.7%) 4 (40.0%)  5 (71.4%)        28 (48.3%) 9 (36.0%)  6 (46.2%)        12 (52.2%) 8 (53.3%)  3 (30.0%)       
##    - 1             16 (53.3%) 6 (60.0%)  2 (28.6%)        30 (51.7%) 16 (64.0%) 7 (53.8%)        11 (47.8%) 7 (46.7%)  7 (70.0%)       
## ---------------------------------------------------------------------------------------------------------------------------------------

#logistic for table 3 (Ket qua OR, 95%CI cho bang 3)

a$out=a$Improvement.of.ambulation
data2=a

data2$out1[data2$out==1] <- 1
data2$out1[data2$out==0 ] <- 0
data2$out1[data2$out==2 ] <- 0
data2$AmbulationPO1 <- as.numeric(data2$AmbulationPO)    
data2$ASIAPreOp1 <- as.numeric(data2$ASIAPreOp)    
data2$ASIA_PO1 <- as.numeric(data2$ASIA_PO)  


data2$AmbulationPO2[data2$AmbulationPO1==2] <- 0
data2$AmbulationPO2[data2$AmbulationPO1<2 ] <- 1

data2$ASIAPreOp2[data2$ASIAPreOp1 == 3] <- 0
data2$ASIAPreOp2[data2$ASIAPreOp1 <3 ] <- 1

data2$ASIA_PO2[data2$ASIA_PO ==4] <- 0
data2$ASIA_PO2[data2$ASIA_PO <4 ] <- 1

###logiostic model Code

library("epiDisplay")
## Warning: package 'epiDisplay' was built under R version 3.6.3
## Loading required package: MASS
## Loading required package: nnet
d1 <- ls("package:epiDisplay")
data1d <- subset(data2, data2$localisation==1)
data1e <- subset(data2, data2$localisation==2)
data1f <- subset(data2, data2$localisation==3)

#Table 3_2a

a1=mytable(out~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1d) %>% deleteRows(1)
a1
## 
##           Descriptive Statistics by 'out'          
## ____________________________________________________ 
##                    0          1         2        p  
##                  (N=30)    (N=10)     (N=7)   
## ---------------------------------------------------- 
##    - 0         14 (46.7%) 4 (40.0%) 5 (71.4%)       
##    - 1         16 (53.3%) 6 (60.0%) 2 (28.6%)       
##  age_code                                      0.316
##    - 0         12 (40.0%) 5 (50.0%) 5 (71.4%)       
##    - 1         18 (60.0%) 5 (50.0%) 2 (28.6%)       
##  Tabagisme                                     0.395
##    - 0         16 (53.3%) 3 (30.0%) 4 (57.1%)       
##    - 1         14 (46.7%) 7 (70.0%) 3 (42.9%)       
##  AmbulationPO2                                 0.179
##    - 0         5 (16.7%)  4 (40.0%) 3 (42.9%)       
##    - 1         25 (83.3%) 6 (60.0%) 4 (57.1%)       
##  ASIA_PO2                                      0.587
##    - 0         22 (73.3%) 6 (60.0%) 4 (57.1%)       
##    - 1         8 (26.7%)  4 (40.0%) 3 (42.9%)       
##  Tokuhashi_cat                                 0.144
##    - 1         9 (30.0%)  5 (50.0%) 3 (42.9%)       
##    - 2         9 (30.0%)  4 (40.0%) 4 (57.1%)       
##    - 3         12 (40.0%) 1 (10.0%)  0 ( 0.0%)      
## ----------------------------------------------------

#Table 3_2b

a2=mytable(out~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1e) %>% deleteRows(1)
a2
## 
##            Descriptive Statistics by 'out'          
## _____________________________________________________ 
##                    0          1          2        p  
##                  (N=58)     (N=25)     (N=13)  
## ----------------------------------------------------- 
##    - 0         28 (48.3%) 9 (36.0%)  6 (46.2%)       
##    - 1         30 (51.7%) 16 (64.0%) 7 (53.8%)       
##  age_code                                       0.864
##    - 0         22 (37.9%) 8 (32.0%)  5 (38.5%)       
##    - 1         36 (62.1%) 17 (68.0%) 8 (61.5%)       
##  Tabagisme                                      0.571
##    - 0         36 (62.1%) 15 (60.0%) 6 (46.2%)       
##    - 1         22 (37.9%) 10 (40.0%) 7 (53.8%)       
##  AmbulationPO2                                  0.000
##    - 0         14 (24.1%) 14 (56.0%) 12 (92.3%)      
##    - 1         44 (75.9%) 11 (44.0%) 1 ( 7.7%)       
##  ASIA_PO2                                       0.039
##    - 0         38 (65.5%) 10 (40.0%) 10 (76.9%)      
##    - 1         20 (34.5%) 15 (60.0%) 3 (23.1%)       
##  Tokuhashi_cat                                  0.068
##    - 1         20 (34.5%) 15 (60.0%) 7 (53.8%)       
##    - 2         24 (41.4%) 8 (32.0%)  6 (46.2%)       
##    - 3         14 (24.1%) 2 ( 8.0%)   0 ( 0.0%)      
## -----------------------------------------------------

#Table 3_2c

a3=mytable(out~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1f) %>% deleteRows(1)
a3
## 
##           Descriptive Statistics by 'out'          
## ____________________________________________________ 
##                    0          1          2       p  
##                  (N=23)     (N=15)    (N=10)  
## ---------------------------------------------------- 
##    - 0         12 (52.2%) 8 (53.3%)  3 (30.0%)      
##    - 1         11 (47.8%) 7 (46.7%)  7 (70.0%)      
##  age_code                                      0.947
##    - 0         10 (43.5%) 7 (46.7%)  4 (40.0%)      
##    - 1         13 (56.5%) 8 (53.3%)  6 (60.0%)      
##  Tabagisme                                     0.002
##    - 0         20 (87.0%) 6 (40.0%)  9 (90.0%)      
##    - 1         3 (13.0%)  9 (60.0%)  1 (10.0%)      
##  AmbulationPO2                                 0.058
##    - 0         9 (39.1%)  10 (66.7%) 8 (80.0%)      
##    - 1         14 (60.9%) 5 (33.3%)  2 (20.0%)      
##  ASIA_PO2                                      0.314
##    - 0         16 (69.6%) 7 (46.7%)  5 (50.0%)      
##    - 1         7 (30.4%)  8 (53.3%)  5 (50.0%)      
##  Tokuhashi_cat                                 0.208
##    - 1         8 (34.8%)  6 (40.0%)  3 (30.0%)      
##    - 2         5 (21.7%)  5 (33.3%)  6 (60.0%)      
##    - 3         10 (43.5%) 4 (26.7%)  1 (10.0%)      
## ----------------------------------------------------

#Table 3_2a

a1=mytable(out1~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1d) %>% deleteRows(1)
a1
## 
##     Descriptive Statistics by 'out1'    
## _________________________________________ 
##                    0          1       p  
##                  (N=37)    (N=10)  
## ----------------------------------------- 
##    - 0         19 (51.4%) 4 (40.0%)      
##    - 1         18 (48.6%) 6 (60.0%)      
##  age_code                           1.000
##    - 0         17 (45.9%) 5 (50.0%)      
##    - 1         20 (54.1%) 5 (50.0%)      
##  Tabagisme                          0.320
##    - 0         20 (54.1%) 3 (30.0%)      
##    - 1         17 (45.9%) 7 (70.0%)      
##  AmbulationPO2                      0.439
##    - 0         8 (21.6%)  4 (40.0%)      
##    - 1         29 (78.4%) 6 (60.0%)      
##  ASIA_PO2                           0.814
##    - 0         26 (70.3%) 6 (60.0%)      
##    - 1         11 (29.7%) 4 (40.0%)      
##  Tokuhashi_cat                      0.340
##    - 1         12 (32.4%) 5 (50.0%)      
##    - 2         13 (35.1%) 4 (40.0%)      
##    - 3         12 (32.4%) 1 (10.0%)      
## -----------------------------------------

#Table 3_2b

a2=mytable(out1~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1e) %>% deleteRows(1)
a2
## 
##      Descriptive Statistics by 'out1'    
## __________________________________________ 
##                    0          1        p  
##                  (N=71)     (N=25)  
## ------------------------------------------ 
##    - 0         34 (47.9%) 9 (36.0%)       
##    - 1         37 (52.1%) 16 (64.0%)      
##  age_code                            0.767
##    - 0         27 (38.0%) 8 (32.0%)       
##    - 1         44 (62.0%) 17 (68.0%)      
##  Tabagisme                           1.000
##    - 0         42 (59.2%) 15 (60.0%)      
##    - 1         29 (40.8%) 10 (40.0%)      
##  AmbulationPO2                       0.146
##    - 0         26 (36.6%) 14 (56.0%)      
##    - 1         45 (63.4%) 11 (44.0%)      
##  ASIA_PO2                            0.029
##    - 0         48 (67.6%) 10 (40.0%)      
##    - 1         23 (32.4%) 15 (60.0%)      
##  Tokuhashi_cat                       0.132
##    - 1         27 (38.0%) 15 (60.0%)      
##    - 2         30 (42.3%) 8 (32.0%)       
##    - 3         14 (19.7%) 2 ( 8.0%)       
## ------------------------------------------

#Table 3_2c

a3=mytable(out1~sex_code+age_code+Tabagisme+AmbulationPO2+ASIA_PO2+Tokuhashi_cat,data=data1f) %>% deleteRows(1)
a3
## 
##      Descriptive Statistics by 'out1'    
## __________________________________________ 
##                    0          1        p  
##                  (N=33)     (N=15)  
## ------------------------------------------ 
##    - 0         15 (45.5%) 8 (53.3%)       
##    - 1         18 (54.5%) 7 (46.7%)       
##  age_code                            1.000
##    - 0         14 (42.4%) 7 (46.7%)       
##    - 1         19 (57.6%) 8 (53.3%)       
##  Tabagisme                           0.002
##    - 0         29 (87.9%) 6 (40.0%)       
##    - 1         4 (12.1%)  9 (60.0%)       
##  AmbulationPO2                       0.505
##    - 0         17 (51.5%) 10 (66.7%)      
##    - 1         16 (48.5%) 5 (33.3%)       
##  ASIA_PO2                            0.430
##    - 0         21 (63.6%) 7 (46.7%)       
##    - 1         12 (36.4%) 8 (53.3%)       
##  Tokuhashi_cat                       0.871
##    - 1         11 (33.3%) 6 (40.0%)       
##    - 2         11 (33.3%) 5 (33.3%)       
##    - 3         11 (33.3%) 4 (26.7%)       
## ------------------------------------------

Mo hinh logistic cho Cervical spine surgery

Sex
res1d1 = glm(out1 ~ sex_code , family=binomial,
data=data1d)
logistic.display(res1d1)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)         P(Wald's test) P(LR-test)
## sex_code: 1 vs 0  1.58 (0.38,6.55)  0.526          0.523     
##                                                              
## Log-likelihood = -24.1229
## No. of observations = 47
## AIC value = 52.2458
Age
res1d2 = glm(out1 ~ age_code , family=binomial,
data=data1d)
logistic.display(res1d2)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)         P(Wald's test) P(LR-test)
## age_code: 1 vs 0  0.85 (0.21,3.44)  0.82           0.82      
##                                                              
## Log-likelihood = -24.3012
## No. of observations = 47
## AIC value = 52.6024
Tabagisme
res1d3 = glm(out1 ~ Tabagisme , family=binomial,
data=data1d)
logistic.display(res1d3)
## 
## Logistic regression predicting out1 
##  
##                    OR(95%CI)          P(Wald's test) P(LR-test)
## Tabagisme: 1 vs 0  2.75 (0.61,12.29)  0.187          0.172     
##                                                                
## Log-likelihood = -23.3932
## No. of observations = 47
## AIC value = 50.7864
AmbulationPO1
res1d4 = glm(out1 ~ AmbulationPO1 , family=binomial,
data=data1d)
logistic.display(res1d4)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)         P(Wald's test) P(LR-test)
## AmbulationPO1 (cont. var.) 2.69 (0.74,9.73)  0.132          0.12      
##                                                                       
## Log-likelihood = -23.116
## No. of observations = 47
## AIC value = 50.2319
ASIA_PO1
res1d5 = glm(out1 ~ ASIA_PO1 , family=binomial,
data=data1d)
logistic.display(res1d5)
## 
## Logistic regression predicting out1 
##  
##                       OR(95%CI)         P(Wald's test) P(LR-test)
## ASIA_PO1 (cont. var.) 0.96 (0.36,2.53)  0.931          0.932     
##                                                                  
## Log-likelihood = -24.3234
## No. of observations = 47
## AIC value = 52.6469
Tokuhashi_cat
res1d6 = glm(out1 ~ Tokuhashi_cat , family=binomial,
data=data1d)
logistic.display(res1d6)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)         P(Wald's test) P(LR-test)
## Tokuhashi_cat (cont. var.) 0.51 (0.19,1.33)  0.168          0.15      
##                                                                       
## Log-likelihood = -23.2905
## No. of observations = 47
## AIC value = 50.581

Mo hinh logistic cho Thoracic spine surgery

Sex
res1e1 = glm(out1 ~ sex_code , family=binomial,
data=data1e)
logistic.display(res1e1)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)         P(Wald's test) P(LR-test)
## sex_code: 1 vs 0  1.63 (0.64,4.18)  0.306          0.301     
##                                                              
## Log-likelihood = -54.5204
## No. of observations = 96
## AIC value = 113.0408
Age
res1e2 = glm(out1 ~ age_code , family=binomial,
data=data1e)
logistic.display(res1e2)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)       P(Wald's test) P(LR-test)
## age_code: 1 vs 0  1.3 (0.5,3.43)  0.591          0.588     
##                                                            
## Log-likelihood = -54.9084
## No. of observations = 96
## AIC value = 113.8168

res1e = glm(out1 ~ age_code+sex_code+Tabagisme+AmbulationPO1+ASIA_PO1+Tokuhashi_cat , family=binomial, data=data1e) logistic.display(res1e)

Tabagisme
res1e3 = glm(out1 ~ Tabagisme , family=binomial,
data=data1e)
logistic.display(res1e3)
## 
## Logistic regression predicting out1 
##  
##                    OR(95%CI)         P(Wald's test) P(LR-test)
## Tabagisme: 1 vs 0  0.97 (0.38,2.45)  0.941          0.941     
##                                                               
## Log-likelihood = -55.0525
## No. of observations = 96
## AIC value = 114.105
AmbulationPO1
res1e4 = glm(out1 ~ AmbulationPO1 , family=binomial,
data=data1e)
logistic.display(res1e4)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)         P(Wald's test) P(LR-test)
## AmbulationPO1 (cont. var.) 2.31 (0.99,5.42)  0.053          0.046     
##                                                                       
## Log-likelihood = -53.0606
## No. of observations = 96
## AIC value = 110.1211
ASIA_PO1
res1e5 = glm(out1 ~ ASIA_PO1 , family=binomial,
data=data1e)
logistic.display(res1e5)
## 
## Logistic regression predicting out1 
##  
##                       OR(95%CI)         P(Wald's test) P(LR-test)
## ASIA_PO1 (cont. var.) 0.68 (0.36,1.29)  0.237          0.239     
##                                                                  
## Log-likelihood = -54.3607
## No. of observations = 96
## AIC value = 112.7213
Tokuhashi_cat
res1e6 = glm(out1 ~ Tokuhashi_cat , family=binomial,
data=data1e)
logistic.display(res1e6)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)     P(Wald's test) P(LR-test)
## Tokuhashi_cat (cont. var.) 0.5 (0.25,1)  0.052          0.041     
##                                                                   
## Log-likelihood = -52.9635
## No. of observations = 96
## AIC value = 109.927

Mo hinh logistic cho Lumbar spine surgery

Sex
res1f1 = glm(out1 ~ sex_code , family=binomial,
data=data1f)
logistic.display(res1f1)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)         P(Wald's test) P(LR-test)
## sex_code: 1 vs 0  0.73 (0.21,2.48)  0.613          0.613     
##                                                              
## Log-likelihood = -29.6839
## No. of observations = 48
## AIC value = 63.3678
Age
res1f2 = glm(out1 ~ age_code , family=binomial,
data=data1f)
logistic.display(res1f2)
## 
## Logistic regression predicting out1 
##  
##                   OR(95%CI)         P(Wald's test) P(LR-test)
## age_code: 1 vs 0  0.84 (0.25,2.87)  0.784          0.784     
##                                                              
## Log-likelihood = -29.7745
## No. of observations = 48
## AIC value = 63.549

res1f = glm(out1 ~ age_code+sex_code+Tabagisme+AmbulationPO1+ASIA_PO1+Tokuhashi_cat , family=binomial, data=data1f) logistic.display(res1f)

Tabagisme
res1f3 = glm(out1 ~ Tabagisme , family=binomial,
data=data1f)
logistic.display(res1f3)
## 
## Logistic regression predicting out1 
##  
##                    OR(95%CI)          P(Wald's test) P(LR-test)
## Tabagisme: 1 vs 0  10.87 (2.5,47.28)  0.001          < 0.001   
##                                                                
## Log-likelihood = -24.0592
## No. of observations = 48
## AIC value = 52.1184
AmbulationPO1
res1f4 = glm(out1 ~ AmbulationPO1 , family=binomial,
data=data1f)
logistic.display(res1f4)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)         P(Wald's test) P(LR-test)
## AmbulationPO1 (cont. var.) 2.04 (0.67,6.27)  0.212          0.19      
##                                                                       
## Log-likelihood = -28.9538
## No. of observations = 48
## AIC value = 61.9077
ASIA_PO1
res1f5 = glm(out1 ~ ASIA_PO1 , family=binomial,
data=data1f)
logistic.display(res1f5)
## 
## Logistic regression predicting out1 
##  
##                       OR(95%CI)        P(Wald's test) P(LR-test)
## ASIA_PO1 (cont. var.) 0.62 (0.2,1.91)  0.407          0.407     
##                                                                 
## Log-likelihood = -29.469
## No. of observations = 48
## AIC value = 62.938
Tokuhashi_cat
res1f6 = glm(out1 ~ Tokuhashi_cat , family=binomial,
data=data1f)
logistic.display(res1f6)
## 
## Logistic regression predicting out1 
##  
##                            OR(95%CI)         P(Wald's test) P(LR-test)
## Tokuhashi_cat (cont. var.) 0.82 (0.38,1.74)  0.6            0.599     
##                                                                       
## Log-likelihood = -29.6738
## No. of observations = 48
## AIC value = 63.3476