##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_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`
##recodage bases de données le cas échéant----

cbnpc<-filter(data_guillaume_cbnpc_ddi, c(eligible_etude=="1" ))

##recodage de données le cas échéant----
cbnpc$charlson_2<-ifelse(cbnpc$charlson>=2, 1, 0)
cbnpc$charlson_3<-ifelse(cbnpc$charlson>=3, 1, 0)
cbnpc$charlson_4<-ifelse(cbnpc$charlson>=4, 1, 0)
cbnpc$charlson_5<-ifelse(cbnpc$charlson>=5, 1, 0)
cbnpc$adjuvant<-ifelse(cbnpc$metastatique==0, 1, 0)
cbnpc$raf_mek<-ifelse(cbnpc$classe_medt=="raf_mek", 1, 0)
cbnpc$egfr<-ifelse(cbnpc$classe_medt=="egfr", 1, 0)
cbnpc$alk<-ifelse(cbnpc$classe_medt=="alk", 1, 0)
cbnpc$cytotox<-ifelse(cbnpc$classe_medt=="cytotox", 1, 0)
cbnpc$kras<-ifelse(cbnpc$classe_medt=="kras", 1, 0)
cbnpc$ret<-ifelse(cbnpc$classe_medt=="ret", 1, 0)
cbnpc$vegfr<-ifelse(cbnpc$classe_medt=="vegfr", 1, 0)
cbnpc$pftox_mediane<-cbnpc$pftox/7.23
cbnpc$tox3mois<-ifelse(cbnpc$pftox<3 & cbnpc$evt_tox==1, 1, 0)
cbnpc$old75<-ifelse(cbnpc$age>=75, 1, 0)

##renommer des variables pour présentation dans les tableaux de résultats
library(labelled)
var_label(cbnpc$type_evt) <- "evenement lié au médicament"
var_label(cbnpc$consequence_evt) <- "conséquence des evenements liés au médicament"
var_label(cbnpc$meta_snc) <- "presence de métastase cérébrale"
var_label(cbnpc$polymedique) <- "patient polymediqué"         
var_label(cbnpc$comprehension) <- "patient avec difficulté de comprehension"
var_label(cbnpc$pb_social) <- "patient avec difficulté sociale"
var_label(cbnpc$actif_pro) <- "patient avec activité professionnelle"
var_label(cbnpc$ddi) <- "patient avec interaction médicamenteuse"
var_label(cbnpc$evt_tox) <- "patient avec evenement lié au médicament"
var_label(cbnpc$charlson_2) <- "score de charlson >=2 (hors tumeur)" 
var_label(cbnpc$patient_seul) <- "patient vivant seul"
var_label(cbnpc$risque_observance) <- "patient avec risque de mauvaise observance"
var_label(cbnpc$raf_mek) <- "patient traité par inhibiteurs de Raf et Mek"
var_label(cbnpc$egfr) <- "patient traité par inhibiteurs de egfrl"
var_label(cbnpc$alk) <- "patient traité par inhibiteurs alk"
var_label(cbnpc$cytotox) <- "patient traité par cytotoxique"
var_label(cbnpc$ret) <- "patient traité par inhibiteur de ret"
var_label(cbnpc$vegfr) <- "patient traité par inhibiteur de vegfr"
var_label(cbnpc$kras) <- "patient traité par inhibiteur de RAS"
var_label(cbnpc$ipp_mdt) <- "patient traité par IPP"
var_label(cbnpc$ddi_surdosage) <- "patient avec interaction à risque de surdosage"
var_label(cbnpc$ddi_sousdosage) <- "patient avec interaction à risque de sousdosage"
var_label(cbnpc$ddi_ph) <- "patient avec interaction IPP et pH"
var_label(cbnpc$ddi_ph) <- "patient avec interaction IPP et pH"
var_label(cbnpc$ddi_qt) <- "patient avec interaction et risque allongement QT"
var_label(cbnpc$rque_pharma) <- "patient avec conclusion analyse pharmaceutique"
var_label(cbnpc$rque_pharma_ei) <- "Analyse interaction avec conclusion risque EI"
var_label(cbnpc$tox3mois) <- "Patient avec évènement toxique précoce"



##tableau descriptif population globales ----

tbl_summary(
  cbnpc, include = c("age", "pathologie", "dci", "raf_mek", "egfr", "alk", "cytotox", "vegfr", "kras", "ret", "polymedique","stade", "ligne", "evt_tox","tox3mois", "charlson", "charlson_2", "meta_snc", "comprehension", "pb_social", "actif_pro", "patient_seul", "ddi","ddi_surdosage","ddi_sousdosage","ipp_mdt","ddi_ph","ddi_qt","rque_pharma","rque_pharma_ei", "risque_observance"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 941
age 67 (58, 75)
pathologie
    ADK Bronchique 82 (87.2%)
    ADK Thymique 2 (2.1%)
    Carcinome épidermoïde 4 (4.3%)
    Thymome 1 (1.1%)
    THYMOME 1 (1.1%)
    Tumeur carcinoïde 3 (3.2%)
    Tumeur neuro endocrine 1 (1.1%)
dci
    Afatinib 5 (5.3%)
    ALECTINIB 4 (4.3%)
    BRIGATINIB 7 (7.4%)
    CABOZANTINIB 1 (1.1%)
    CRIZOTINIB 2 (2.1%)
    Dabrafénib / Tramétinib 7 (7.4%)
    Erlotinib 1 (1.1%)
    Everolimus 7 (7.4%)
    Géfitinib 1 (1.1%)
    Lorlatinib 1 (1.1%)
    LORLATINIB 8 (8.5%)
    MOBOCERTINIB 2 (2.1%)
    Osimertinib 36 (38.3%)
    Osimertinib + Crizotinib 1 (1.1%)
    PRALSETINIB 1 (1.1%)
    SOTORASIB 8 (8.5%)
    Sunitinib 1 (1.1%)
    XELODA+TEMODAL 1 (1.1%)
patient traité par inhibiteurs de Raf et Mek 7 (7.4%)
patient traité par inhibiteurs de egfrl 45 (47.9%)
patient traité par inhibiteurs alk 22 (23.4%)
patient traité par cytotoxique 1 (1.1%)
patient traité par inhibiteur de vegfr 2 (2.1%)
patient traité par inhibiteur de RAS 8 (8.5%)
patient traité par inhibiteur de ret 1 (1.1%)
patient polymediqué 44 (46.8%)
stade
    Localement avancé 2 (2.1%)
    métastatique 58 (61.7%)
    Métastatique 33 (35.1%)
    Primitif 1 (1.1%)
ligne
    1ère ligne 39 (41.5%)
    2ème ligne 18 (19.1%)
    3ème ligne 21 (22.3%)
    4ème ligne 6 (6.4%)
    5ème ligne 6 (6.4%)
    6ème ligne 2 (2.1%)
    8ème ligne 1 (1.1%)
    Récidive 1 (1.1%)
patient avec evenement lié au médicament 30 (31.9%)
Patient avec évènement toxique précoce 21 (22.3%)
charlson
    0 4 (4.3%)
    1 13 (13.8%)
    2 20 (21.3%)
    3 26 (27.7%)
    4 17 (18.1%)
    5 7 (7.4%)
    6 4 (4.3%)
    7 1 (1.1%)
    8 2 (2.1%)
score de charlson >=2 (hors tumeur) 77 (81.9%)
presence de métastase cérébrale 29 (30.9%)
patient avec difficulté de comprehension 6 (6.4%)
patient avec difficulté sociale 5 (5.3%)
patient avec activité professionnelle 28 (29.8%)
patient vivant seul 11 (11.7%)
patient avec interaction médicamenteuse 64 (68.1%)
patient avec interaction à risque de surdosage 37 (39.4%)
patient avec interaction à risque de sousdosage 2 (2.1%)
patient traité par IPP 19 (20.2%)
patient avec interaction IPP et pH 5 (5.3%)
patient avec interaction et risque allongement QT 20 (21.3%)
patient avec conclusion analyse pharmaceutique 49 (52.1%)
Analyse interaction avec conclusion risque EI 44 (46.8%)
patient avec risque de mauvaise observance 11 (11.7%)
1 Median (IQR); n (%)
##Description des evènements liés aux traitement 
tbl_summary(
  cbnpc, include = c("type_evt"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 941
evenement lié au médicament
    0 64 (68.1%)
    ANOREXIE ET DIARRHEES GRADE 2 1 (1.1%)
    Anorexie GRADE 2 1 (1.1%)
    ASTHENIE 1 (1.1%)
    Asthénie / hyperbilirubinémie 1 (1.1%)
    ASTHENIE / Perturbation triglycérides / Glycémie 1 (1.1%)
    Asthénie et nausées grade 3 1 (1.1%)
    Asthénie grade 1 / Myalgies grade 1 1 (1.1%)
    Asthénie, AEG 1 (1.1%)
    COLITE / MTEV 1 (1.1%)
    Conjonctivite bilatérale / Mucite / Syndrome Lyell 1 (1.1%)
    CRAMPES DIGESTIVES 1 (1.1%)
    CYTOLYSE HEPATIQUE 1 (1.1%)
    CYTOLYSE HEPATIQUE GRADE 4 1 (1.1%)
    DECOMPENSATION CARDIAQUE 1 (1.1%)
    Décompensation cardiaque gauche / OAP Dr Mazières ne retrouve pas d'imputabilité dans la biblio à posteriori de l'osimertinib = reprise ttt 1 (1.1%)
    DELIRE, Troubles Psy 1 (1.1%)
    DIARRHEES / CONSTIPATION 1 (1.1%)
    DIARRHEES GRADE 2 1 (1.1%)
    Diarrhées grade 2 1 (1.1%)
    DIARRHEES GRADE 2 / VOMISSEMENTS GRADE 2 1 (1.1%)
    EMBOLIE PULMONAIRE (THROMBUS INTRACARDIAQUE) 1 (1.1%)
    Hypertension 1 (1.1%)
    OEDEMES GRADE 2 / DEPRESSION (dérégulation thymique) / HYPERTRIGLYCERIDEMIE 1 (1.1%)
    Pneumopathie grade 2, OMI et crampes grade 2 1 (1.1%)
    Pneumopathie liée au traitement 1 (1.1%)
    Toxicité cutanée grade 1 / diarrhées grade 1 1 (1.1%)
    TOXICITE CUTANEO MUQUEUSE / TOXICIT2 Digestive grade 2 1 (1.1%)
    TOXIDERMIE GRADE 2 1 (1.1%)
    TROUBLES DIGESTIFS GRADE 2-3 (DIARRHEES / CONSTIPATIONS) 1 (1.1%)
    TROUBLES MNESIQUES / ASTHENIE 1 (1.1%)
1 n (%)
##Conséquences des évènements liés aux traitement
tbl_summary(
  cbnpc, include = c("consequence_evt"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 941
conséquence des evenements liés au médicament
    ARRET DEFINITIF 7 (23.3%)
    ARRET DEFINITIF CRIZOTINIB 1 (3.3%)
    ARRET DEFINITIF MEKINIST 1 (3.3%)
    ARRET TEMPORAIRE 3 (10.0%)
    Arret temporaire / Concession posologique 2 (6.7%)
    Concession posologique 16 (53.3%)
    Unknown 64
1 n (%)
###Description durée de traitement
km_duree_tt<-survfit(Surv(cbnpc$duree_tt, cbnpc$evt_tt)~1)
km_duree_tt
## Call: survfit(formula = Surv(cbnpc$duree_tt, cbnpc$evt_tt) ~ 1)
## 
##       n events median 0.95LCL 0.95UCL
## [1,] 94     78     11    7.43    14.5
ggsurvplot(km_duree_tt, data = cbnpc,
           risk.table=TRUE,
           surv.scale="percent",
           break.time.by=3,
           surv.median.line = "hv"
)

##Description motifs d'arrêts de traitement
tbl_summary(
  cbnpc, include = c("motif_arret"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 941
motif_arret
    ARRET Par Patiente / Occlusion intestinale non liée au ttt 1 (1.3%)
    ARRET par patiente / TOXICITE 1 (1.3%)
    DECES 14 (17.7%)
    progression 1 (1.3%)
    PROGRESSION 38 (48.1%)
    PROGRESSION / Toxicite 4 (5.1%)
    PROGRESSION + NON Observance 1 (1.3%)
    Soins palliatifs 8 (10.1%)
    TOXICITE 9 (11.4%)
    TOXICITE / REANIMATION 1 (1.3%)
    TOXICITE / SOINS PAL 1 (1.3%)
    Unknown 15
1 n (%)
###Description PFS
km_pfs<-survfit(Surv(cbnpc$pfs, cbnpc$evt_pfs)~1)
km_pfs
## Call: survfit(formula = Surv(cbnpc$pfs, cbnpc$evt_pfs) ~ 1)
## 
##       n events median 0.95LCL 0.95UCL
## [1,] 94     62   13.8    8.17    20.1
ggsurvplot(km_pfs, data = cbnpc,
           risk.table=TRUE,
           surv.scale="percent",
           break.time.by=3,
           surv.median.line = "hv"
)

###Description OS
km_os<-survfit(Surv(cbnpc$os, cbnpc$evt_os)~1)
km_os
## Call: survfit(formula = Surv(cbnpc$os, cbnpc$evt_os) ~ 1)
## 
##       n events median 0.95LCL 0.95UCL
## [1,] 94     67   22.8    17.3    26.5
ggsurvplot(km_os, data = cbnpc,
           risk.table=TRUE,
           surv.scale="percent",
           break.time.by=3,
           surv.median.line = "hv"
)

#Courbe de Kaplan Meier survie sans événement toxique lié au médicament----

km_pftox<-survfit(Surv(cbnpc$pftox, cbnpc$evt_tox)~1)
km_pftox
## Call: survfit(formula = Surv(cbnpc$pftox, cbnpc$evt_tox) ~ 1)
## 
##       n events median 0.95LCL 0.95UCL
## [1,] 94     30     NA      NA      NA
ggsurvplot(km_pftox, data = cbnpc,
           risk.table=TRUE,
           surv.scale="percent",
           break.time.by=2,
           surv.median.line = "hv"
)
## Warning in .add_surv_median(p, fit, type = surv.median.line, fun = fun, :
## Median survival not reached.

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


####age en valeur continue
modsurv<-coxph(Surv(pftox, evt_tox)~age, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
age 1.01 0.98, 1.04 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
modsurv<-coxph(Surv(pftox, evt_tox)~old75, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
old75 1.04 0.46, 2.34 >0.9
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson en valeur continue
modsurv<-coxph(Surv(pftox, evt_tox)~charlson, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson 1.18 0.97, 1.43 0.11
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=2---
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
score de charlson >=2 (hors tumeur) 2.63 0.79, 8.70 0.11
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=3---
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 1.79 0.80, 4.03 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=4---
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_4, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_4 1.89 0.92, 3.88 0.082
1 HR = Hazard Ratio, CI = Confidence Interval
####charlson >=5---
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_5, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_5 1.60 0.65, 3.92 0.3
1 HR = Hazard Ratio, CI = Confidence Interval
####présence de méta cérébrale
modsurv<-coxph(Surv(pftox, evt_tox)~meta_snc, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
presence de métastase cérébrale 0.74 0.33, 1.66 0.5
1 HR = Hazard Ratio, CI = Confidence Interval
####problème de compréhension
modsurv<-coxph(Surv(pftox, evt_tox)~comprehension, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec difficulté de comprehension 1.67 0.50, 5.51 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
####problème social
modsurv<-coxph(Surv(pftox, evt_tox)~pb_social, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec difficulté sociale 1.08 0.26, 4.56 >0.9
1 HR = Hazard Ratio, CI = Confidence Interval
####patient vivant seul
modsurv<-coxph(Surv(pftox, evt_tox)~patient_seul, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient vivant seul 2.28 0.93, 5.63 0.073
1 HR = Hazard Ratio, CI = Confidence Interval
####activité professionnelle
modsurv<-coxph(Surv(pftox, evt_tox)~actif_pro, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec activité professionnelle 0.81 0.36, 1.82 0.6
1 HR = Hazard Ratio, CI = Confidence Interval
####interaction médicamenteuse
modsurv<-coxph(Surv(pftox, evt_tox)~ddi, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec interaction médicamenteuse 0.60 0.29, 1.24 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
####interaction médicamenteuse à risque de surdosage
modsurv<-coxph(Surv(pftox, evt_tox)~ddi_surdosage, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec interaction à risque de surdosage 0.73 0.34, 1.55 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
####comedication par ipp
modsurv<-coxph(Surv(pftox, evt_tox)~ipp_mdt, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par IPP 1.24 0.53, 2.89 0.6
1 HR = Hazard Ratio, CI = Confidence Interval
####patient polymédiqué
modsurv<-coxph(Surv(pftox, evt_tox)~polymedique, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient polymediqué 1.12 0.54, 2.29 0.8
1 HR = Hazard Ratio, CI = Confidence Interval
####patient avec risque de mauvaise observance
modsurv<-coxph(Surv(pftox, evt_tox)~risque_observance, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient avec risque de mauvaise observance 1.19 0.41, 3.42 0.7
1 HR = Hazard Ratio, CI = Confidence Interval
####stade adjuvant vs autres 
modsurv<-coxph(Surv(pftox, evt_tox)~adjuvant, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
adjuvant 0.95 0.23, 4.00 >0.9
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par combo raf_mek
modsurv<-coxph(Surv(pftox, evt_tox)~raf_mek, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteurs de Raf et Mek 3.25 1.23, 8.57 0.017
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par cytotox
modsurv<-coxph(Surv(pftox, evt_tox)~cytotox, data=cbnpc)
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 1 ; coefficient may be infinite.
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par cytotoxique 0.00 0.00, Inf >0.9
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par inhibiteur egfr
modsurv<-coxph(Surv(pftox, evt_tox)~egfr, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteurs de egfrl 0.44 0.21, 0.94 0.035
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par inhibiteur alk
modsurv<-coxph(Surv(pftox, evt_tox)~alk, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteurs alk 0.76 0.31, 1.87 0.6
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par inhibiteur vegfr
modsurv<-coxph(Surv(pftox, evt_tox)~vegfr, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteur de vegfr 3.98 0.53, 30.0 0.2
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par inhibiteur ret
modsurv<-coxph(Surv(pftox, evt_tox)~ret, data=cbnpc)
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 1 ; coefficient may be infinite.
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteur de ret 0.00 0.00, Inf >0.9
1 HR = Hazard Ratio, CI = Confidence Interval
##patient traité par inhibiteur ras
modsurv<-coxph(Surv(pftox, evt_tox)~kras, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
patient traité par inhibiteur de RAS 2.96 1.00, 8.75 0.050
1 HR = Hazard Ratio, CI = Confidence Interval
#ANALYSES MULTIVARIEE avec Charlson >=2

modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2+patient_seul+ddi+raf_mek+egfr+vegfr+kras, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
score de charlson >=2 (hors tumeur) 2.74 0.76, 9.91 0.12
patient vivant seul 2.11 0.74, 6.01 0.2
patient avec interaction médicamenteuse 0.65 0.30, 1.41 0.3
patient traité par inhibiteurs de Raf et Mek 3.01 0.98, 9.24 0.054
patient traité par inhibiteurs de egfrl 0.66 0.27, 1.61 0.4
patient traité par inhibiteur de vegfr 9.21 1.01, 84.2 0.049
patient traité par inhibiteur de RAS 1.79 0.49, 6.51 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
step(modsurv)
## Start:  AIC=247.84
## Surv(pftox, evt_tox) ~ charlson_2 + patient_seul + ddi + raf_mek + 
##     egfr + vegfr + kras
## 
##                Df    AIC
## - kras          1 246.58
## - egfr          1 246.69
## - ddi           1 247.00
## - patient_seul  1 247.58
## <none>            247.84
## - vegfr         1 248.30
## - charlson_2    1 248.75
## - raf_mek       1 249.10
## 
## Step:  AIC=246.58
## Surv(pftox, evt_tox) ~ charlson_2 + patient_seul + ddi + raf_mek + 
##     egfr + vegfr
## 
##                Df    AIC
## - ddi           1 245.82
## - egfr          1 246.15
## <none>            246.58
## - vegfr         1 246.90
## - patient_seul  1 247.39
## - raf_mek       1 247.43
## - charlson_2    1 247.98
## 
## Step:  AIC=245.83
## Surv(pftox, evt_tox) ~ charlson_2 + patient_seul + raf_mek + 
##     egfr + vegfr
## 
##                Df    AIC
## <none>            245.82
## - vegfr         1 246.07
## - egfr          1 246.15
## - raf_mek       1 246.35
## - charlson_2    1 247.11
## - patient_seul  1 247.40
## Call:
## coxph(formula = Surv(pftox, evt_tox) ~ charlson_2 + patient_seul + 
##     raf_mek + egfr + vegfr, data = cbnpc)
## 
##                 coef exp(coef) se(coef)      z      p
## charlson_2    1.0622    2.8928   0.6608  1.608 0.1079
## patient_seul  0.9900    2.6912   0.4811  2.058 0.0396
## raf_mek       0.9281    2.5296   0.5469  1.697 0.0897
## egfr         -0.6303    0.5324   0.4175 -1.510 0.1311
## vegfr         2.1038    8.1975   1.1331  1.857 0.0634
## 
## Likelihood ratio test=15.44  on 5 df, p=0.008645
## n= 94, number of events= 30
###Modèle final
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_2+patient_seul+raf_mek+vegfr, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
score de charlson >=2 (hors tumeur) 2.85 0.78, 10.4 0.11
patient vivant seul 2.84 1.12, 7.22 0.029
patient traité par inhibiteurs de Raf et Mek 3.49 1.27, 9.57 0.015
patient traité par inhibiteur de vegfr 11.0 1.22, 99.2 0.033
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 MULTIVARIEE avec CHarlson >=3
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3+patient_seul+ddi+raf_mek+egfr+vegfr+kras, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 2.30 0.92, 5.72 0.074
patient vivant seul 2.54 0.86, 7.49 0.092
patient avec interaction médicamenteuse 0.60 0.28, 1.30 0.2
patient traité par inhibiteurs de Raf et Mek 2.64 0.84, 8.27 0.10
patient traité par inhibiteurs de egfrl 0.62 0.25, 1.51 0.3
patient traité par inhibiteur de vegfr 9.24 1.02, 83.9 0.048
patient traité par inhibiteur de RAS 1.87 0.48, 7.30 0.4
1 HR = Hazard Ratio, CI = Confidence Interval
step(modsurv)
## Start:  AIC=247.27
## Surv(pftox, evt_tox) ~ charlson_3 + patient_seul + ddi + raf_mek + 
##     egfr + vegfr + kras
## 
##                Df    AIC
## - kras          1 246.04
## - egfr          1 246.38
## - ddi           1 246.86
## <none>            247.27
## - vegfr         1 247.73
## - patient_seul  1 247.76
## - raf_mek       1 247.79
## - charlson_3    1 248.75
## 
## Step:  AIC=246.04
## Surv(pftox, evt_tox) ~ charlson_3 + patient_seul + ddi + raf_mek + 
##     egfr + vegfr
## 
##                Df    AIC
## - egfr          1 246.00
## - ddi           1 246.01
## <none>            246.04
## - raf_mek       1 246.19
## - vegfr         1 246.40
## - charlson_3    1 247.98
## - patient_seul  1 248.42
## 
## Step:  AIC=246
## Surv(pftox, evt_tox) ~ charlson_3 + patient_seul + ddi + raf_mek + 
##     vegfr
## 
##                Df    AIC
## <none>            246.00
## - ddi           1 246.81
## - vegfr         1 246.82
## - charlson_3    1 247.38
## - raf_mek       1 248.27
## - patient_seul  1 248.84
## Call:
## coxph(formula = Surv(pftox, evt_tox) ~ charlson_3 + patient_seul + 
##     ddi + raf_mek + vegfr, data = cbnpc)
## 
##                 coef exp(coef) se(coef)      z      p
## charlson_3    0.8209    2.2725   0.4649  1.766 0.0775
## patient_seul  1.1892    3.2845   0.4899  2.428 0.0152
## ddi          -0.6454    0.5244   0.3770 -1.712 0.0869
## raf_mek       1.2039    3.3330   0.5236  2.299 0.0215
## vegfr         2.4187   11.2317   1.1133  2.173 0.0298
## 
## Likelihood ratio test=15.27  on 5 df, p=0.009278
## n= 94, number of events= 30
##modèle final 
modsurv<-coxph(Surv(pftox, evt_tox)~charlson_3+patient_seul+raf_mek+vegfr, data=cbnpc)
modsurv%>%tbl_regression(exponentiate = TRUE)
Characteristic HR1 95% CI1 p-value
charlson_3 2.02 0.82, 4.96 0.12
patient vivant seul 3.35 1.30, 8.67 0.012
patient traité par inhibiteurs de Raf et Mek 3.27 1.17, 9.12 0.024
patient traité par inhibiteur de vegfr 9.23 1.07, 79.7 0.043
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ée avec tableau de résultat, ex tox selon aucmoy en valeur continue
cbnpc |>
  tbl_uvregression(
    y = tox3mois,
    include = c(charlson,charlson_2, charlson_3, charlson_4, charlson_4, charlson_5, ddi, ddi_surdosage, rque_pharma_ei, polymedique, patient_seul, actif_pro, comprehension, egfr, vegfr, kras, alk, adjuvant, raf_mek,pb_social,comprehension,risque_observance , cytotox, ),
    method = glm,
    method.args = list(family = binomial),
    exponentiate = TRUE
  ) |> 
  bold_labels()
## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1
## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1

## Warning: glm.fit: des probabilités ont été ajustées numériquement à 0 ou 1
Characteristic N OR1 95% CI1 p-value
charlson 94 0.96 0.70, 1.29 0.8
patient avec difficulté de comprehension 94 0.68 0.03, 4.55 0.7
patient avec difficulté sociale 94 0.86 0.04, 6.25 0.9
patient avec activité professionnelle 94 1.24 0.42, 3.43 0.7
patient vivant seul 94 5.44 1.46, 21.3 0.011
patient polymediqué 94 1.04 0.39, 2.77 >0.9
patient avec interaction médicamenteuse 94 0.32 0.12, 0.87 0.026
patient avec interaction à risque de surdosage 94 0.40 0.12, 1.15 0.10
Analyse interaction avec conclusion risque EI 94 0.63 0.23, 1.68 0.4
patient avec risque de mauvaise observance 94 0.75 0.11, 3.22 0.7
score de charlson >=2 (hors tumeur) 94 1.42 0.41, 6.67 0.6
charlson_3 94 1.07 0.40, 3.01 0.9
charlson_4 94 1.02 0.35, 2.80 >0.9
charlson_5 94 0.94 0.20, 3.41 >0.9
adjuvant 94 0.68 0.03, 4.55 0.7
patient traité par inhibiteurs de Raf et Mek 94 2.87 0.53, 14.2 0.2
patient traité par inhibiteurs de egfrl 94 0.26 0.08, 0.74 0.016
patient traité par inhibiteurs alk 94 0.72 0.19, 2.25 0.6
patient traité par cytotoxique 94 0.00 >0.9
patient traité par inhibiteur de RAS 94 4.06 0.88, 18.8 0.064
patient traité par inhibiteur de vegfr 94 3.60 0.14, 93.8 0.4
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, cbnpc)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
coords(roc1, "best", ret=c("threshold", "specificity", "1-npv"))
##           threshold specificity     1-npv
## threshold       1.5   0.1917808 0.1764706
##Anlyse multivariée
##modele multivarié
mod<-glm(  tox3mois ~ charlson_2+ddi+patient_seul+egfr+raf_mek+kras, data=cbnpc, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ charlson_2 + ddi + patient_seul + egfr + 
##     raf_mek + kras, family = "binomial", data = cbnpc)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.6217  -0.6026  -0.3699  -0.3479   2.3308  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)   -0.7962     0.7554  -1.054   0.2918  
## charlson_2     0.1262     0.7500   0.168   0.8664  
## ddi           -0.9438     0.5800  -1.627   0.1036  
## patient_seul   1.6723     0.7823   2.138   0.0325 *
## egfr          -1.0341     0.6592  -1.569   0.1167  
## raf_mek        1.1896     0.9266   1.284   0.1992  
## kras           0.5694     0.9596   0.593   0.5530  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 99.862  on 93  degrees of freedom
## Residual deviance: 82.720  on 87  degrees of freedom
## AIC: 96.72
## 
## Number of Fisher Scoring iterations: 5
exp(coefficients(mod))
##  (Intercept)   charlson_2          ddi patient_seul         egfr      raf_mek 
##    0.4510305    1.1344664    0.3891276    5.3245439    0.3555484    3.2858414 
##         kras 
##    1.7671487
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                   2.5 %    97.5 %
## (Intercept)  0.08594928  1.829550
## charlson_2   0.28177046  5.802916
## ddi          0.12240277  1.223166
## patient_seul 1.13429166 26.132026
## egfr         0.09009479  1.254852
## raf_mek      0.50258279 20.953715
## kras         0.24546365 11.644884
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.45 0.09, 1.83 0.3
score de charlson >=2 (hors tumeur) 1.13 0.28, 5.80 0.9
patient avec interaction médicamenteuse 0.39 0.12, 1.22 0.10
patient vivant seul 5.32 1.13, 26.1 0.033
patient traité par inhibiteurs de egfrl 0.36 0.09, 1.25 0.12
patient traité par inhibiteurs de Raf et Mek 3.29 0.50, 21.0 0.2
patient traité par inhibiteur de RAS 1.77 0.25, 11.6 0.6
1 OR = Odds Ratio, CI = Confidence Interval
step(mod)
## Start:  AIC=96.72
## tox3mois ~ charlson_2 + ddi + patient_seul + egfr + raf_mek + 
##     kras
## 
##                Df Deviance    AIC
## - charlson_2    1   82.748 94.748
## - kras          1   83.065 95.065
## - raf_mek       1   84.322 96.322
## <none>              82.720 96.720
## - egfr          1   85.293 97.293
## - ddi           1   85.345 97.345
## - patient_seul  1   87.191 99.191
## 
## Step:  AIC=94.75
## tox3mois ~ ddi + patient_seul + egfr + raf_mek + kras
## 
##                Df Deviance    AIC
## - kras          1   83.150 93.150
## - raf_mek       1   84.502 94.502
## <none>              82.748 94.748
## - egfr          1   85.298 95.298
## - ddi           1   85.376 95.376
## - patient_seul  1   87.255 97.255
## 
## Step:  AIC=93.15
## tox3mois ~ ddi + patient_seul + egfr + raf_mek
## 
##                Df Deviance    AIC
## - raf_mek       1   84.682 92.682
## <none>              83.150 93.150
## - ddi           1   85.775 93.775
## - egfr          1   86.776 94.776
## - patient_seul  1   88.651 96.651
## 
## Step:  AIC=92.68
## tox3mois ~ ddi + patient_seul + egfr
## 
##                Df Deviance    AIC
## <none>              84.682 92.682
## - ddi           1   86.701 92.701
## - patient_seul  1   89.655 95.655
## - egfr          1   90.184 96.184
## 
## Call:  glm(formula = tox3mois ~ ddi + patient_seul + egfr, family = "binomial", 
##     data = cbnpc)
## 
## Coefficients:
##  (Intercept)           ddi  patient_seul          egfr  
##      -0.4899       -0.8002        1.6728       -1.3327  
## 
## Degrees of Freedom: 93 Total (i.e. Null);  90 Residual
## Null Deviance:       99.86 
## Residual Deviance: 84.68     AIC: 92.68
##Modèle final 

mod<-glm(  tox3mois ~ patient_seul+egfr, data=cbnpc, family="binomial")
summary(mod)
## 
## Call:
## glm(formula = tox3mois ~ patient_seul + egfr, family = "binomial", 
##     data = cbnpc)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.5598  -0.8001  -0.4098  -0.4098   2.2445  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)   
## (Intercept)   -0.9749     0.3324  -2.933  0.00336 **
## patient_seul   1.8400     0.7222   2.548  0.01084 * 
## egfr          -1.4599     0.5978  -2.442  0.01460 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 99.862  on 93  degrees of freedom
## Residual deviance: 86.701  on 91  degrees of freedom
## AIC: 92.701
## 
## Number of Fisher Scoring iterations: 5
exp(coefficients(mod))
##  (Intercept) patient_seul         egfr 
##    0.3772200    6.2965397    0.2322679
exp(confint(mod, level=0.95))
## Attente de la réalisation du profilage...
##                   2.5 %     97.5 %
## (Intercept)  0.18973564  0.7061760
## patient_seul 1.55708061 28.0415839
## egfr         0.06444021  0.7012089
mod%>%tbl_regression(intercept = TRUE, exponentiate = TRUE)
Characteristic OR1 95% CI1 p-value
(Intercept) 0.38 0.19, 0.71 0.003
patient vivant seul 6.30 1.56, 28.0 0.011
patient traité par inhibiteurs de egfrl 0.23 0.06, 0.70 0.015
1 OR = Odds Ratio, CI = Confidence Interval