##chargement des packages----
library(questionr)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.1     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(tableone)
library(labelled)
library(gtsummary)
library(GGally)
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
library(readxl)
library(effects)
## Le chargement a nécessité le package : carData
## lattice theme set by effectsTheme()
## See ?effectsTheme for details.
library(survival)
library(survminer)
## Le chargement a nécessité le package : ggpubr
## 
## Attachement du package : 'survminer'
## 
## L'objet suivant est masqué depuis 'package:survival':
## 
##     myeloma
library(ggplot2)
library(dplyr)
library(knitr)
library(cowplot)
## 
## Attachement du package : 'cowplot'
## 
## L'objet suivant est masqué depuis 'package:ggpubr':
## 
##     get_legend
## 
## L'objet suivant est masqué depuis 'package:lubridate':
## 
##     stamp
##chargement des données 

data_guillaume_dermato_ddi <- read_excel("Y:/fp/FAC/2023-2024/Memoires DES/Guillaume Flandin/20240705/data_guillaume_dermato_ddi.xlsx")
## New names:
## • `Détail` -> `Détail...39`
## • `Détail` -> `Détail...46`
## • `Détail` -> `Détail...70`
## • `Détail` -> `Détail...72`
dermato_g<-filter(data_guillaume_dermato_ddi, c(eligible_etude=="1" ))
data_guillaume_cbnpc_ddi <- read_excel("Y:/fp/FAC/2023-2024/Memoires DES/Guillaume Flandin/20240705/data_guillaume_cbnpc_ddi.xlsx")
## New names:
## • `Détail` -> `Détail...43`
## • `Détail` -> `Détail...50`
## • `Détail` -> `Détail...73`
## • `Détail` -> `Détail...75`
cbnpc<-filter(data_guillaume_cbnpc_ddi, c(eligible_etude=="1" ))

dermato<-subset(dermato_g, select =c(IPP, pftox, evt_tox, charlson, comprehension, patient_seul, actif_pro, ddi, ddi_surdosage, ddi_sousdosage, ipp_mdt, rque_pharma, rque_pharma_ei, polymedique, age,pftox_mediane, origine))
pneumo<-subset(cbnpc, select =c(IPP, pftox, evt_tox, charlson, comprehension, patient_seul, actif_pro, ddi, ddi_surdosage, ddi_sousdosage, ipp_mdt, rque_pharma, rque_pharma_ei, polymedique, age,pftox_mediane, origine))
##regroupement en un seul tableau 
datpoolees<-bind_rows(dermato, pneumo)
datpoolees
## # A tibble: 172 × 17
##          IPP  pftox evt_tox charlson comprehension patient_seul actif_pro   ddi
##        <dbl>  <dbl>   <dbl>    <dbl>         <dbl>        <dbl>     <dbl> <dbl>
##  1 198802639 10.1         1        4             0            1         0     0
##  2 199205455  0.933       0        3             0            0         0     0
##  3 199605403  3.9         0        3             0            0         0     1
##  4 201202193  0.5         0        1             0            0         0     0
##  5 201205512  0.467       1        3             0            0         0     0
##  6 201403781  4.37        1        1             0            1         1     0
##  7 201405565  4.77        0        1             0            0         0     0
##  8 201406799  4.67        0        0             1            0         0     1
##  9 201408775 36.2         0        0             0            0         1     1
## 10 201409786  5.83        1        6             0            0         0     0
## # ℹ 162 more rows
## # ℹ 9 more variables: ddi_surdosage <dbl>, ddi_sousdosage <dbl>, ipp_mdt <dbl>,
## #   rque_pharma <dbl>, rque_pharma_ei <dbl>, polymedique <dbl>, age <dbl>,
## #   pftox_mediane <dbl>, origine <chr>
##recodage de données le cas échéant----
datpoolees$charlson_2<-ifelse(datpoolees$charlson>=2, 1, 0)
datpoolees$charlson_3<-ifelse(datpoolees$charlson>=3, 1, 0)
datpoolees$charlson_4<-ifelse(datpoolees$charlson>=4, 1, 0)
datpoolees$charlson_5<-ifelse(datpoolees$charlson>=5, 1, 0)
datpoolees$tox3mois<-ifelse(datpoolees$pftox<3 & datpoolees$evt_tox==1, 1, 0)
datpoolees$old75<-ifelse(datpoolees$age>=75, 1, 0)
datpoolees$origine.cat<-ifelse(datpoolees$origine =="dermato", 1, 0)

##modèles de cox ANALYSE UNIVARIEE ----

####age en valeur continue
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~age, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
age 1.01 1.00, 1.03 0.14
1 HR = Hazard Ratio, CI = Confidence Interval
####patient >=75 ans
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~old75, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
old75 1.24 0.79, 1.95 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson en valeur continue
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~charlson, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson 1.14 1.02, 1.27 0.019
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=2---
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~charlson_2, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_2 1.38 0.88, 2.18 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=3---
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~charlson_3, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 1.45 0.95, 2.20 0.081
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=4---
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~charlson_4, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_4 1.68 1.11, 2.55 0.015
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=5---
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~charlson_5, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_5 1.89 1.17, 3.07 0.010
1 HR = Hazard Ratio, CI = Confidence Interval
####problème de compréhension
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~comprehension, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
comprehension 2.10 1.11, 3.98 0.023
1 HR = Hazard Ratio, CI = Confidence Interval
####patient vivant seul
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~patient_seul, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient_seul 1.38 0.79, 2.40 0.3
1 HR = Hazard Ratio, CI = Confidence Interval
####activité professionnelle
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~actif_pro, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
actif_pro 0.64 0.40, 1.04 0.072
1 HR = Hazard Ratio, CI = Confidence Interval
####interaction médicamenteuse
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~ddi, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
ddi 0.89 0.59, 1.35 0.6
1 HR = Hazard Ratio, CI = Confidence Interval
####interaction médicamenteuse à risque de surdosage
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~ddi_surdosage, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
ddi_surdosage 0.79 0.51, 1.24 0.3
1 HR = Hazard Ratio, CI = Confidence Interval
####prise d'ipp
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~ipp_mdt, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
ipp_mdt 1.26 0.78, 2.04 0.3
1 HR = Hazard Ratio, CI = Confidence Interval
####conclusion necessité suivi
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~rque_pharma_ei, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
rque_pharma_ei 0.73 0.47, 1.13 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
####patient polymédiqué
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~polymedique, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
polymedique 1.32 0.87, 1.99 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
####pathologie (1 = dermato)
modsurv<-coxph(Surv(pftox_mediane, evt_tox)~origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
origine.cat 2.61 1.68, 4.04 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
##Analyse multivariée avec charlson >=2
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2+age+comprehension+actif_pro+polymedique+rque_pharma_ei+origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_2 1.42 0.67, 3.04 0.4
age 1.00 0.98, 1.03 0.7
comprehension 1.76 0.91, 3.40 0.092
actif_pro 0.95 0.51, 1.76 0.9
polymedique 1.34 0.83, 2.17 0.2
rque_pharma_ei 0.73 0.43, 1.22 0.2
origine.cat 3.69 2.28, 5.96 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
step(modsurv)
## Start:  AIC=812.07
## Surv(pftox, evt_tox) ~ charlson_2 + age + comprehension + actif_pro + 
##     polymedique + rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - actif_pro       1 810.10
## - age             1 810.23
## - charlson_2      1 810.90
## - polymedique     1 811.51
## - rque_pharma_ei  1 811.54
## <none>              812.07
## - comprehension   1 812.59
## - origine.cat     1 840.21
## 
## Step:  AIC=810.1
## Surv(pftox, evt_tox) ~ charlson_2 + age + comprehension + polymedique + 
##     rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - age             1 808.31
## - charlson_2      1 809.07
## - rque_pharma_ei  1 809.58
## - polymedique     1 809.60
## <none>              810.10
## - comprehension   1 810.60
## - origine.cat     1 839.07
## 
## Step:  AIC=808.31
## Surv(pftox, evt_tox) ~ charlson_2 + comprehension + polymedique + 
##     rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - rque_pharma_ei  1 807.76
## - polymedique     1 807.94
## <none>              808.31
## - comprehension   1 808.65
## - charlson_2      1 810.95
## - origine.cat     1 838.25
## 
## Step:  AIC=807.76
## Surv(pftox, evt_tox) ~ charlson_2 + comprehension + polymedique + 
##     origine.cat
## 
##                 Df    AIC
## - polymedique    1 806.38
## <none>             807.76
## - comprehension  1 808.07
## - charlson_2     1 810.37
## - origine.cat    1 846.47
## 
## Step:  AIC=806.38
## Surv(pftox, evt_tox) ~ charlson_2 + comprehension + origine.cat
## 
##                 Df    AIC
## <none>             806.38
## - comprehension  1 806.61
## - charlson_2     1 809.68
## - origine.cat    1 845.70
## Call:
## coxph(formula = Surv(pftox, evt_tox) ~ charlson_2 + comprehension + 
##     origine.cat, data = datpoolees)
## 
##                 coef exp(coef) se(coef)     z       p
## charlson_2    0.5302    1.6993   0.2374 2.233  0.0255
## comprehension 0.5227    1.6865   0.3289 1.589  0.1121
## origine.cat   1.4206    4.1398   0.2300 6.175 6.6e-10
## 
## Likelihood ratio test=45.89  on 3 df, p=5.99e-10
## n= 172, number of events= 93
##modèle final avec Charlson >=2 (covariables retenues sur le critère Aikake)
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2+comprehension+origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_2 1.70 1.07, 2.71 0.026
comprehension 1.69 0.89, 3.21 0.11
origine.cat 4.14 2.64, 6.50 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
ggforest(modsurv)
## Warning in .get_data(model, data = data): The `data` argument is not provided.
## Data will be extracted from model fit.

###Modèles alternatifs à 2 covariables
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2+origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_2 1.76 1.11, 2.80 0.016
origine.cat 4.23 2.70, 6.64 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
ggforest(modsurv)
## Warning in .get_data(model, data = data): The `data` argument is not provided.
## Data will be extracted from model fit.

##Analyse multivariée avec charlson >=3 
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3+age+comprehension+actif_pro+polymedique+rque_pharma_ei+origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 1.60 0.83, 3.09 0.2
age 1.00 0.98, 1.02 0.9
comprehension 1.73 0.90, 3.31 0.10
actif_pro 0.96 0.52, 1.77 0.9
polymedique 1.30 0.80, 2.11 0.3
rque_pharma_ei 0.72 0.43, 1.22 0.2
origine.cat 3.80 2.35, 6.15 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
step(modsurv)
## Start:  AIC=810.89
## Surv(pftox, evt_tox) ~ charlson_3 + age + comprehension + actif_pro + 
##     polymedique + rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - actif_pro       1 808.91
## - age             1 808.93
## - polymedique     1 810.04
## - rque_pharma_ei  1 810.43
## <none>              810.89
## - charlson_3      1 810.90
## - comprehension   1 811.27
## - origine.cat     1 840.21
## 
## Step:  AIC=808.91
## Surv(pftox, evt_tox) ~ charlson_3 + age + comprehension + polymedique + 
##     rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - age             1 806.97
## - polymedique     1 808.09
## - rque_pharma_ei  1 808.47
## <none>              808.91
## - charlson_3      1 809.07
## - comprehension   1 809.30
## - origine.cat     1 838.94
## 
## Step:  AIC=806.97
## Surv(pftox, evt_tox) ~ charlson_3 + comprehension + polymedique + 
##     rque_pharma_ei + origine.cat
## 
##                  Df    AIC
## - polymedique     1 806.18
## - rque_pharma_ei  1 806.52
## <none>              806.97
## - comprehension   1 807.30
## - charlson_3      1 810.95
## - origine.cat     1 837.57
## 
## Step:  AIC=806.18
## Surv(pftox, evt_tox) ~ charlson_3 + comprehension + rque_pharma_ei + 
##     origine.cat
## 
##                  Df    AIC
## - rque_pharma_ei  1 804.83
## <none>              806.18
## - comprehension   1 806.47
## - charlson_3      1 811.43
## - origine.cat     1 841.96
## 
## Step:  AIC=804.83
## Surv(pftox, evt_tox) ~ charlson_3 + comprehension + origine.cat
## 
##                 Df    AIC
## <none>             804.83
## - comprehension  1 805.10
## - charlson_3     1 809.68
## - origine.cat    1 845.03
## Call:
## coxph(formula = Surv(pftox, evt_tox) ~ charlson_3 + comprehension + 
##     origine.cat, data = datpoolees)
## 
##                 coef exp(coef) se(coef)     z        p
## charlson_3    0.5643    1.7583   0.2178 2.591  0.00957
## comprehension 0.5257    1.6917   0.3284 1.601  0.10937
## origine.cat   1.4419    4.2286   0.2316 6.225 4.83e-10
## 
## Likelihood ratio test=47.43  on 3 df, p=2.814e-10
## n= 172, number of events= 93
###modèle final (covariables retenues sur le critère Aikake)
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3+origine.cat+comprehension, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 1.76 1.15, 2.69 0.010
origine.cat 4.23 2.69, 6.66 <0.001
comprehension 1.69 0.89, 3.22 0.11
1 HR = Hazard Ratio, CI = Confidence Interval
ggforest(modsurv)
## Warning in .get_data(model, data = data): The `data` argument is not provided.
## Data will be extracted from model fit.

###modèles alternatifs à 2 covariables 
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3+origine.cat, data=datpoolees)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 1.81 1.19, 2.77 0.006
origine.cat 4.30 2.73, 6.76 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval
ggforest(modsurv)
## Warning in .get_data(model, data = data): The `data` argument is not provided.
## Data will be extracted from model fit.

#ANALYSE SUR CRITERE DE TOXICITE PRECOCE

##Analyses univariées 
##analyses univariée avec tableau de résultat, ex tox selon aucmoy en valeur continue
datpoolees |>
  tbl_uvregression(
    y = tox3mois,
    include = c(age, old75, charlson, charlson_2, charlson_3, charlson_4, charlson_5, ddi, ddi_surdosage, rque_pharma_ei, polymedique, patient_seul, actif_pro, comprehension, origine.cat),
    method = glm,
    method.args = list(family = binomial),
    exponentiate = TRUE
  ) |> 
  bold_labels()
Characteristic N OR1 95% CI1 p-value
charlson 172 1.18 0.98, 1.42 0.075
comprehension 172 1.77 0.56, 5.20 0.3
patient_seul 172 1.30 0.46, 3.35 0.6
actif_pro 172 0.54 0.23, 1.20 0.15
ddi 172 0.91 0.47, 1.80 0.8
ddi_surdosage 172 0.74 0.36, 1.48 0.4
rque_pharma_ei 172 1.12 0.56, 2.19 0.8
polymedique 172 1.49 0.77, 2.94 0.2
age 172 1.03 1.00, 1.05 0.038
charlson_2 172 2.06 0.94, 4.91 0.082
charlson_3 172 1.85 0.94, 3.74 0.078
charlson_4 172 1.67 0.83, 3.32 0.15
charlson_5 172 1.89 0.82, 4.27 0.13
old75 172 1.43 0.67, 2.96 0.3
origine.cat 172 1.95 1.00, 3.84 0.052
1 OR = Odds Ratio, CI = Confidence Interval
##courbe ROC sur score de charlson
library(pROC)
## Type 'citation("pROC")' for a citation.
## 
## Attachement du package : 'pROC'
## 
## Les objets suivants sont masqués depuis 'package:stats':
## 
##     cov, smooth, var
roc1<-roc(tox3mois~charlson, datpoolees)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
coords(roc1, "best", ret=c("threshold", "specificity", "1-npv"))
##           threshold specificity     1-npv
## threshold       2.5    0.495935 0.2179487
##courbe ROC sur age
library(pROC)
roc1<-roc(tox3mois~age, datpoolees)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
coords(roc1, "best", ret=c("threshold", "specificity", "1-npv"))
##           threshold specificity    1-npv
## threshold      58.5   0.4065041 0.137931
##modele multivarié
mod<-glm(  tox3mois ~ charlson_2+age+origine.cat+polymedique+actif_pro, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ charlson_2 + age + origine.cat + polymedique + 
##     actif_pro, family = "binomial", data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.2086  -0.7954  -0.7065   1.1951   2.0163  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept) -2.81208    1.13504  -2.478   0.0132 *
## charlson_2   0.60935    0.63873   0.954   0.3401  
## age          0.01387    0.01946   0.713   0.4760  
## origine.cat  0.81485    0.37180   2.192   0.0284 *
## polymedique  0.24002    0.35672   0.673   0.5010  
## actif_pro    0.01379    0.50320   0.027   0.9781  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 194.95  on 166  degrees of freedom
## AIC: 206.95
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)  charlson_2         age origine.cat polymedique   actif_pro 
##  0.06007987  1.83923731  1.01397041  2.25883286  1.27127366  1.01388580
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                   2.5 %   97.5 %
## (Intercept) 0.005889147 0.518380
## charlson_2  0.531724119 6.606512
## age         0.976592293 1.054458
## origine.cat 1.098861194 4.745839
## polymedique 0.631082534 2.570193
## actif_pro   0.368158623 2.696288
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.06 0.01, 0.52 0.013
charlson_2 1.84 0.53, 6.61 0.3
age 1.01 0.98, 1.05 0.5
origine.cat 2.26 1.10, 4.75 0.028
polymedique 1.27 0.63, 2.57 0.5
actif_pro 1.01 0.37, 2.70 >0.9
1 OR = Odds Ratio, CI = Confidence Interval
step(mod)
## Start:  AIC=206.95
## tox3mois ~ charlson_2 + age + origine.cat + polymedique + actif_pro
## 
##               Df Deviance    AIC
## - actif_pro    1   194.95 204.95
## - polymedique  1   195.40 205.40
## - age          1   195.47 205.47
## - charlson_2   1   195.87 205.87
## <none>             194.95 206.95
## - origine.cat  1   199.87 209.87
## 
## Step:  AIC=204.95
## tox3mois ~ charlson_2 + age + origine.cat + polymedique
## 
##               Df Deviance    AIC
## - polymedique  1   195.40 203.40
## - age          1   195.50 203.50
## - charlson_2   1   195.89 203.89
## <none>             194.95 204.95
## - origine.cat  1   200.03 208.03
## 
## Step:  AIC=203.4
## tox3mois ~ charlson_2 + age + origine.cat
## 
##               Df Deviance    AIC
## - age          1   196.12 202.12
## - charlson_2   1   196.32 202.32
## <none>             195.40 203.40
## - origine.cat  1   200.81 206.81
## 
## Step:  AIC=202.12
## tox3mois ~ charlson_2 + origine.cat
## 
##               Df Deviance    AIC
## <none>             196.12 202.12
## - charlson_2   1   201.70 205.70
## - origine.cat  1   202.27 206.27
## 
## Call:  glm(formula = tox3mois ~ charlson_2 + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Coefficients:
## (Intercept)   charlson_2  origine.cat  
##     -2.0906       0.9836       0.8822  
## 
## Degrees of Freedom: 171 Total (i.e. Null);  169 Residual
## Null Deviance:       205.5 
## Residual Deviance: 196.1     AIC: 202.1
##modele final sur critere aikake
mod<-glm(  tox3mois ~ charlson_2+origine.cat, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ charlson_2 + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.0836  -0.7558  -0.7230   1.2742   2.1010  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  -2.0906     0.4650  -4.495 6.94e-06 ***
## charlson_2    0.9836     0.4378   2.247   0.0246 *  
## origine.cat   0.8822     0.3604   2.448   0.0144 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 196.12  on 169  degrees of freedom
## AIC: 202.12
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)  charlson_2 origine.cat 
##   0.1236161   2.6741034   2.4162412
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                  2.5 %   97.5 %
## (Intercept) 0.04683633 0.292799
## charlson_2  1.17572226 6.631286
## origine.cat 1.20180150 4.961262
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.12 0.05, 0.29 <0.001
charlson_2 2.67 1.18, 6.63 0.025
origine.cat 2.42 1.20, 4.96 0.014
1 OR = Odds Ratio, CI = Confidence Interval
##Analyse multivariée avec Charlson à 3 

mod<-glm(  tox3mois ~ charlson_3+age+origine.cat+polymedique+actif_pro, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ charlson_3 + age + origine.cat + polymedique + 
##     actif_pro, family = "binomial", data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.2333  -0.8157  -0.6859   1.1914   1.9509  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept) -2.84186    1.18548  -2.397   0.0165 *
## charlson_3   0.27109    0.52865   0.513   0.6081  
## age          0.01981    0.01908   1.038   0.2991  
## origine.cat  0.74328    0.35931   2.069   0.0386 *
## polymedique  0.21467    0.35696   0.601   0.5476  
## actif_pro   -0.02888    0.50068  -0.058   0.9540  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 195.61  on 166  degrees of freedom
## AIC: 207.61
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)  charlson_3         age origine.cat polymedique   actif_pro 
##  0.05831732  1.31139668  1.02000878  2.10281828  1.23945518  0.97153060
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                   2.5 %    97.5 %
## (Intercept) 0.005058668 0.5449513
## charlson_3  0.464410561 3.7262911
## age         0.983705025 1.0606028
## origine.cat 1.046224062 4.3027642
## polymedique 0.614614786 2.5055763
## actif_pro   0.354177482 2.5678190
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.06 0.01, 0.54 0.017
charlson_3 1.31 0.46, 3.73 0.6
age 1.02 0.98, 1.06 0.3
origine.cat 2.10 1.05, 4.30 0.039
polymedique 1.24 0.61, 2.51 0.5
actif_pro 0.97 0.35, 2.57 >0.9
1 OR = Odds Ratio, CI = Confidence Interval
step(mod)
## Start:  AIC=207.61
## tox3mois ~ charlson_3 + age + origine.cat + polymedique + actif_pro
## 
##               Df Deviance    AIC
## - actif_pro    1   195.61 205.61
## - charlson_3   1   195.87 205.87
## - polymedique  1   195.97 205.97
## - age          1   196.73 206.73
## <none>             195.61 207.61
## - origine.cat  1   199.97 209.97
## 
## Step:  AIC=205.61
## tox3mois ~ charlson_3 + age + origine.cat + polymedique
## 
##               Df Deviance    AIC
## - charlson_3   1   195.89 203.89
## - polymedique  1   195.98 203.98
## - age          1   196.88 204.88
## <none>             195.61 205.61
## - origine.cat  1   200.13 208.13
## 
## Step:  AIC=203.89
## tox3mois ~ age + origine.cat + polymedique
## 
##               Df Deviance    AIC
## - polymedique  1   196.32 202.32
## <none>             195.89 203.89
## - origine.cat  1   200.21 206.21
## - age          1   200.58 206.58
## 
## Step:  AIC=202.32
## tox3mois ~ age + origine.cat
## 
##               Df Deviance    AIC
## <none>             196.32 202.32
## - origine.cat  1   200.95 204.95
## - age          1   201.70 205.70
## 
## Call:  glm(formula = tox3mois ~ age + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Coefficients:
## (Intercept)          age  origine.cat  
##    -3.15560      0.02856      0.74478  
## 
## Degrees of Freedom: 171 Total (i.e. Null);  169 Residual
## Null Deviance:       205.5 
## Residual Deviance: 196.3     AIC: 202.3
##modele final sur critere aikake
mod<-glm(  tox3mois ~ age+origine.cat, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ age + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.2461  -0.8266  -0.6818   1.2343   1.9696  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -3.15560    0.90146  -3.501 0.000464 ***
## age          0.02856    0.01275   2.240 0.025076 *  
## origine.cat  0.74478    0.34926   2.132 0.032969 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 196.32  on 169  degrees of freedom
## AIC: 202.32
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)         age origine.cat 
##  0.04261302  1.02897629  2.10598801
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                   2.5 %    97.5 %
## (Intercept) 0.006654776 0.2324878
## age         1.004329568 1.0561046
## origine.cat 1.068047373 4.2207938
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.04 0.01, 0.23 <0.001
age 1.03 1.00, 1.06 0.025
origine.cat 2.11 1.07, 4.22 0.033
1 OR = Odds Ratio, CI = Confidence Interval
##Analyse multivariée avec Charlson à 3 et age binaire

datpoolees$old58<-ifelse(datpoolees$age>58, 1, 0)

mod<-glm(  tox3mois ~ charlson_3+old58+origine.cat+polymedique+actif_pro, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ charlson_3 + old58 + origine.cat + polymedique + 
##     actif_pro, family = "binomial", data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.2239  -0.8138  -0.6609   1.1939   2.2757  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  -2.7568     0.6338  -4.350 1.36e-05 ***
## charlson_3   -0.1476     0.4781  -0.309   0.7576    
## old58         1.7240     0.6287   2.742   0.0061 ** 
## origine.cat   0.8962     0.3740   2.397   0.0165 *  
## polymedique   0.2453     0.3650   0.672   0.5016    
## actif_pro     0.4503     0.5415   0.832   0.4057    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 188.49  on 166  degrees of freedom
## AIC: 200.49
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)  charlson_3       old58 origine.cat polymedique   actif_pro 
##   0.0634974   0.8628127   5.6068212   2.4503550   1.2780407   1.5687351
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                  2.5 %     97.5 %
## (Intercept) 0.01681847  0.2044697
## charlson_3  0.33881409  2.2377592
## old58       1.70517472 20.4132433
## origine.cat 1.18826952  5.1762253
## polymedique 0.62444819  2.6287801
## actif_pro   0.53731426  4.6003191
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.06 0.02, 0.20 <0.001
charlson_3 0.86 0.34, 2.24 0.8
old58 5.61 1.71, 20.4 0.006
origine.cat 2.45 1.19, 5.18 0.017
polymedique 1.28 0.62, 2.63 0.5
actif_pro 1.57 0.54, 4.60 0.4
1 OR = Odds Ratio, CI = Confidence Interval
step(mod)
## Start:  AIC=200.49
## tox3mois ~ charlson_3 + old58 + origine.cat + polymedique + actif_pro
## 
##               Df Deviance    AIC
## - charlson_3   1   188.58 198.58
## - polymedique  1   188.94 198.94
## - actif_pro    1   189.18 199.18
## <none>             188.49 200.49
## - origine.cat  1   194.40 204.40
## - old58        1   196.73 206.73
## 
## Step:  AIC=198.58
## tox3mois ~ old58 + origine.cat + polymedique + actif_pro
## 
##               Df Deviance    AIC
## - polymedique  1   188.98 196.98
## - actif_pro    1   189.32 197.32
## <none>             188.58 198.58
## - origine.cat  1   194.67 202.67
## - old58        1   199.15 207.15
## 
## Step:  AIC=196.98
## tox3mois ~ old58 + origine.cat + actif_pro
## 
##               Df Deviance    AIC
## - actif_pro    1   189.69 195.69
## <none>             188.98 196.98
## - origine.cat  1   195.38 201.38
## - old58        1   199.89 205.89
## 
## Step:  AIC=195.69
## tox3mois ~ old58 + origine.cat
## 
##               Df Deviance    AIC
## <none>             189.69 195.69
## - origine.cat  1   195.47 199.47
## - old58        1   201.70 205.70
## 
## Call:  glm(formula = tox3mois ~ old58 + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Coefficients:
## (Intercept)        old58  origine.cat  
##     -2.3534       1.4012       0.8536  
## 
## Degrees of Freedom: 171 Total (i.e. Null);  169 Residual
## Null Deviance:       205.5 
## Residual Deviance: 189.7     AIC: 195.7
##modele final sur critere aikake
mod<-glm(  tox3mois ~ old58+origine.cat, data=datpoolees, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ old58 + origine.cat, family = "binomial", 
##     data = datpoolees)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.1359  -0.8079  -0.6348   1.2195   2.2110  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  -2.3534     0.4564  -5.156 2.52e-07 ***
## old58         1.4012     0.4401   3.184  0.00145 ** 
## origine.cat   0.8536     0.3597   2.373  0.01764 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 205.54  on 171  degrees of freedom
## Residual deviance: 189.69  on 169  degrees of freedom
## AIC: 195.69
## 
## Number of Fisher Scoring iterations: 4
exp(coefficients(mod))
## (Intercept)       old58 origine.cat 
##  0.09504835  4.06018406  2.34818049
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                  2.5 %     97.5 %
## (Intercept) 0.03613699  0.2190187
## old58       1.79214277 10.2389908
## origine.cat 1.16953422  4.8154942
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.10 0.04, 0.22 <0.001
old58 4.06 1.79, 10.2 0.001
origine.cat 2.35 1.17, 4.82 0.018
1 OR = Odds Ratio, CI = Confidence Interval