##chargement des packages----
library(questionr)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.2     
## ── 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)
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
## Registered S3 method overwritten by 'car':
##   method           from
##   na.action.merMod lme4
## 
## 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 

recap_survies_v20260707 <- read_excel("~/fac/2025_2026/theses/20260707/recap_survies_v20260707.xlsx")
## Warning: Expecting numeric in A5515 / R5515C1: got 'D000090771'
## Warning: Expecting numeric in AH5515 / R5515C34: got 'D000090771'
## Warning: Expecting numeric in A5516 / R5516C1: got 'D000371281'
## Warning: Expecting numeric in AH5516 / R5516C34: got 'D000371281'
## Warning: Expecting numeric in A5517 / R5517C1: got 'D00151617'
## Warning: Expecting numeric in AH5517 / R5517C34: got 'D00151617'
## Warning: Expecting numeric in A5518 / R5518C1: got 'D002510777'
## Warning: Expecting numeric in AH5518 / R5518C34: got 'D002510777'
## Warning: Expecting numeric in A5519 / R5519C1: got 'D004009030'
## Warning: Expecting numeric in AH5519 / R5519C34: got 'D004009030'
## Warning: Expecting numeric in A5520 / R5520C1: got 'D016007075'
## Warning: Expecting numeric in AH5520 / R5520C34: got 'D016007075'
## Warning: Expecting numeric in A5521 / R5521C1: got 'D129406'
## Warning: Expecting numeric in AH5521 / R5521C34: got 'D129406'
## Warning: Expecting numeric in A5522 / R5522C1: got 'D144704'
## Warning: Expecting numeric in AH5522 / R5522C34: got 'D144704'
## Warning: Expecting numeric in A5523 / R5523C1: got 'D152912'
## Warning: Expecting numeric in AH5523 / R5523C34: got 'D152912'
## Warning: Expecting numeric in A5524 / R5524C1: got 'D158233'
## Warning: Expecting numeric in AH5524 / R5524C34: got 'D158233'
## Warning: Expecting numeric in A5525 / R5525C1: got 'D18659'
## Warning: Expecting numeric in AH5525 / R5525C34: got 'D18659'
## Warning: Expecting numeric in A5526 / R5526C1: got 'D23173'
## Warning: Expecting numeric in AH5526 / R5526C34: got 'D23173'
## Warning: Expecting numeric in A5527 / R5527C1: got 'D29759'
## Warning: Expecting numeric in AH5527 / R5527C34: got 'D29759'
## Warning: Expecting numeric in A5528 / R5528C1: got 'D349638'
## Warning: Expecting numeric in AH5528 / R5528C34: got 'D349638'
## Warning: Expecting numeric in A5529 / R5529C1: got 'D359549'
## Warning: Expecting numeric in AH5529 / R5529C34: got 'D359549'
## Warning: Expecting numeric in A5530 / R5530C1: got 'D362753'
## Warning: Expecting numeric in AH5530 / R5530C34: got 'D362753'
## Warning: Expecting numeric in A5531 / R5531C1: got 'D366919'
## Warning: Expecting numeric in AH5531 / R5531C34: got 'D366919'
## Warning: Expecting numeric in A5532 / R5532C1: got 'D374881'
## Warning: Expecting numeric in AH5532 / R5532C34: got 'D374881'
## Warning: Expecting numeric in A5533 / R5533C1: got 'D380886'
## Warning: Expecting numeric in AH5533 / R5533C34: got 'D380886'
## Warning: Expecting numeric in A5534 / R5534C1: got 'D391580'
## Warning: Expecting numeric in AH5534 / R5534C34: got 'D391580'
## Warning: Expecting numeric in A5535 / R5535C1: got 'D396386'
## Warning: Expecting numeric in AH5535 / R5535C34: got 'D396386'
## Warning: Expecting numeric in A5536 / R5536C1: got 'D403685'
## Warning: Expecting numeric in AH5536 / R5536C34: got 'D403685'
## Warning: Expecting numeric in A5537 / R5537C1: got 'D428875'
## Warning: Expecting numeric in AH5537 / R5537C34: got 'D428875'
## Warning: Expecting numeric in A5538 / R5538C1: got 'D434510'
## Warning: Expecting numeric in AH5538 / R5538C34: got 'D434510'
## Warning: Expecting numeric in A5539 / R5539C1: got 'D450602'
## Warning: Expecting numeric in AH5539 / R5539C34: got 'D450602'
## Warning: Expecting numeric in A5540 / R5540C1: got 'D46842'
## Warning: Expecting numeric in AH5540 / R5540C34: got 'D46842'
## Warning: Expecting numeric in A5541 / R5541C1: got 'D556716'
## Warning: Expecting numeric in A5542 / R5542C1: got 'D572038'
## Warning: Expecting numeric in A5543 / R5543C1: got 'D605285'
## Warning: Expecting numeric in A5544 / R5544C1: got 'D7328453'
## Warning: Expecting numeric in AH5544 / R5544C34: got 'D7328453'
## Warning: Expecting numeric in A5545 / R5545C1: got 'D73434'
## Warning: Expecting numeric in AH5545 / R5545C34: got 'D73434'
## Warning: Expecting numeric in A5546 / R5546C1: got 'D74311'
## Warning: Expecting numeric in A5547 / R5547C1: got 'D88097'
## Warning: Expecting numeric in AH5547 / R5547C34: got 'D88097'
## Warning: Expecting numeric in A5548 / R5548C1: got 'SJL0'
## Warning: Expecting numeric in A5549 / R5549C1: got 'SJL146050238113400'
## Warning: Expecting numeric in A5550 / R5550C1: got 'SJL1530792802852'
## Warning: Expecting numeric in A5551 / R5551C1: got 'SJL155117867003400'
## Warning: Expecting numeric in A5552 / R5552C1: got 'SJL156063854504800'
## Warning: Expecting numeric in A5553 / R5553C1: got 'sjl161077505134400'
## Warning: Expecting numeric in A5554 / R5554C1: got 'SJL253117655262200'
## Warning: Expecting numeric in A5555 / R5555C1: got 'SJL655448884'
## New names:
## • `nom jeune fille` -> `nom jeune fille...19`
## • `date_os` -> `date_os...55`
## • `nom jeune fille` -> `nom jeune fille...59`
## • `date_os` -> `date_os...81`
## • `` -> `...99`
##recodage des variables et bases de données le cas échéant----

cbnpc<-filter(recap_survies_v20260707, c(eligible_v2=="oui" ))


##motif exclusions##

exclus<-filter(recap_survies_v20260707, c(eligible_v2=="non" ))

tbl_summary(
  exclus, include = c("motif_ineligibilite_2"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 3,3521
motif_ineligibilite_2
    alk 29 (0.9%)
    chit 33 (1.0%)
    cpc 557 (16.6%)
    egfr 99 (3.0%)
    essais_clinique 349 (10.4%)
    her2 20 (0.6%)
    hors_onco 19 (0.6%)
    hors_oncothoracique 78 (2.3%)
    maladie_M0 681 (20.3%)
    mesotheliome 184 (5.5%)
    pas de donnee 25 (0.7%)
    patient_hors_chu 515 (15.4%)
    pediatrie 1 (0.0%)
    raf_mek 9 (0.3%)
    suite_traitement_1ere_ligne_ailleurs_ou_avant_2010 748 (22.3%)
    traitement_non_administré 4 (0.1%)
    vegfr 1 (0.0%)
1 n (%)
##création de variables à plusieurs catégorie selon valeurs variable continue

cbnpc$old70<-ifelse(cbnpc$age_initiation>70, 1, 0)
cbnpc$old65<-ifelse(cbnpc$age_initiation>65, 1, 0)
cbnpc$maigres<-ifelse(cbnpc$imc<18.5, 1, 0)
cbnpc$surpoids<-ifelse(cbnpc$imc>25, 1, 0)
cbnpc$obeses<-ifelse(cbnpc$imc>30, 1, 0)
cbnpc$bsa_cap<-ifelse(cbnpc$bsa>2, 1, 0)
cbnpc$young57<-ifelse(cbnpc$age_initiation<57, 1, 0)
cbnpc$ir60<-ifelse(cbnpc$dfg_ml_min<60, 1, 0)
cbnpc$ir30<-ifelse(cbnpc$dfg_ml_min<30, 1, 0)
cbnpc$ere <- cut(cbnpc$annee, c(2010, 2015, 2018, 2024))
cbnpc$initiation_period<-factor(cbnpc$periode, levels=c(1, 2, 3, 4),
                          labels=c("immunotherapy not available",
                                   "immunotherapy avilable as 2nd line",
                                   "immunotherapy available as 1st line monotherapy",
                                   "chemo_immunotherapy available as 1st line"))


##renommer des variables pour présentation dans les tableaux de résultats
library(labelled)
var_label(cbnpc$old65) <- "Patients older than 65 years"
var_label(cbnpc$old70) <- "Patients older than 70 years"
var_label(cbnpc$young57) <- "Patients younger than 57 years"
var_label(cbnpc$maigres) <- "Patients with BMI <18.5"
var_label(cbnpc$surpoids) <- "Patients with BMI >25"
var_label(cbnpc$obeses) <- "Patients with BMI >30"
var_label(cbnpc$bsa_cap) <- "Patients with BSA >2"
var_label(cbnpc$initiation_period) <- "period according to immunotherapy availability"
var_label(cbnpc$ir30) <- "Patients with GFR<30 ml/min"
var_label(cbnpc$ir60) <- "Patients with GFR<60 ml/min"
var_label(cbnpc$immuno) <- "Patients treated with immunotherapy at any line"
var_label(cbnpc$avastin) <- "Patients treated with bevacizumab at any line"
var_label(cbnpc$histologie) <- "Histologic category"
var_label(cbnpc$protocole_generique_initiation) <- "First line treatment"
var_label(cbnpc$age_initiation) <- "Age at the start of first line"
var_label(cbnpc$tt_initial) <- "First line treatment category"
var_label(cbnpc$imc) <- "Body Mass Index at the start of first line"
var_label(cbnpc$bsa) <- "Body Surface Area"
var_label(cbnpc$poids) <- "Body weight at the start of first line"
var_label(cbnpc$dfg_ml_min) <- "Glomerular filtration Rate at the start of first line"
var_label(cbnpc$sexe.cat) <- "Sex"

##tableau descriptif population globales ----

tbl_summary(
  cbnpc, include = c("age_initiation", "old65", "old70","young57","sexe.cat","poids",
                     "imc","maigres","surpoids","obeses","bsa_cap","dfg_ml_min", 
                     "tt_initial","type_tt_initial","histologie",
                     "imc","immuno", "avastin"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 2,2021
Age at the start of first line 63 (57, 70)
Patients older than 65 years 936 (42.5%)
Patients older than 70 years 547 (24.8%)
Patients younger than 57 years 577 (26.2%)
Sex
    F 782 (35.5%)
    H 1,420 (64.5%)
Body weight at the start of first line 66 (56, 76)
Body Mass Index at the start of first line 22.9 (20.0, 25.8)
Patients with BMI <18.5 289 (13.1%)
Patients with BMI >25 687 (31.2%)
Patients with BMI >30 174 (7.9%)
Patients with BSA >2 322 (14.6%)
Glomerular filtration Rate at the start of first line 91 (76, 104)
    Unknown 27
First line treatment category
    chimio 1,611 (73.2%)
    chimio_immuno 426 (19.3%)
    immuno 165 (7.5%)
type_tt_initial
    chimio 1,464 (66.5%)
    chimio_avastin 147 (6.7%)
    chimio_immuno 426 (19.3%)
    immuno 165 (7.5%)
Histologic category
    epidermoide 816 (37.1%)
    non_epidermoide 1,385 (62.9%)
    Unknown 1
Patients treated with immunotherapy at any line 1,095 (49.7%)
Patients treated with bevacizumab at any line 273 (12.4%)
1 Median (Q1, Q3); n (%)
##détail traitements 1er ligne---
tbl_summary(
  cbnpc, include = c("protocole_generique_initiation"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 2,2021
First line treatment
    cemiplimab 8 (0.4%)
    pembrolizumab 157 (7.1%)
    platine_alimta 773 (35.1%)
    platine_alimta_atezo 2 (0.1%)
    platine_alimta_avastin 129 (5.9%)
    platine_alimta_nivolumab 6 (0.3%)
    platine_alimta_pembro 346 (15.7%)
    platine_docetaxel 56 (2.5%)
    platine_gemcitabine 77 (3.5%)
    platine_gemcitabine_avastin 6 (0.3%)
    platine_gemcitabine_nivolumab 2 (0.1%)
    platine_taxol 247 (11.2%)
    platine_taxol_atezo 8 (0.4%)
    platine_taxol_avastin 12 (0.5%)
    platine_taxol_nivolumab 2 (0.1%)
    platine_taxol_pembro 60 (2.7%)
    platine_vinorelbine 311 (14.1%)
1 n (%)
##tableau descriptif population selon période d'initiation de tt----
tbl_summary(
  cbnpc, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                     "imc","maigres","obeses","surpoids","bsa_cap","dfg_ml_min", 
                     "tt_initial","type_tt_initial","histologie",
                     "imc","immuno", "avastin"),
    by="initiation_period", 
  digits=all_categorical()~ c(0,1)
)%>%
  add_p()
Characteristic immunotherapy not available
N = 635
1
immunotherapy avilable as 2nd line
N = 386
1
immunotherapy available as 1st line monotherapy
N = 402
1
chemo_immunotherapy available as 1st line
N = 779
1
p-value2
Age at the start of first line 62 (55, 68) 63 (56, 69) 65 (58, 71) 64 (58, 71) <0.001
Patients older than 65 years 230 (36.2%) 147 (38.1%) 190 (47.3%) 369 (47.4%) <0.001
Patients older than 70 years 123 (19.4%) 78 (20.2%) 117 (29.1%) 229 (29.4%) <0.001
Patients younger than 57 years 202 (31.8%) 110 (28.5%) 87 (21.6%) 178 (22.8%) <0.001
Sex



0.006
    F 197 (31.0%) 131 (33.9%) 166 (41.3%) 288 (37.0%)
    H 438 (69.0%) 255 (66.1%) 236 (58.7%) 491 (63.0%)
Body weight at the start of first line 66 (57, 76) 66 (56, 76) 66 (56, 77) 65 (56, 76) >0.9
Body Mass Index at the start of first line 23.0 (20.0, 25.6) 22.7 (19.9, 25.8) 23.2 (20.2, 26.4) 22.8 (20.0, 25.6) 0.5
Patients with BMI <18.5 78 (12.3%) 60 (15.5%) 47 (11.7%) 104 (13.4%) 0.4
Patients with BMI >30 51 (8.0%) 36 (9.3%) 27 (6.7%) 60 (7.7%) 0.6
Patients with BMI >25 193 (30.4%) 122 (31.6%) 144 (35.8%) 228 (29.3%) 0.13
Patients with BSA >2 91 (14.3%) 60 (15.5%) 61 (15.2%) 110 (14.1%) >0.9
Glomerular filtration Rate at the start of first line 89 (74, 102) 92 (77, 104) 91 (74, 103) 92 (78, 106) 0.008
    Unknown 14 5 2 6
First line treatment category



<0.001
    chimio 635 (100.0%) 386 (100.0%) 320 (79.6%) 270 (34.7%)
    chimio_immuno 0 (0.0%) 0 (0.0%) 2 (0.5%) 424 (54.4%)
    immuno 0 (0.0%) 0 (0.0%) 80 (19.9%) 85 (10.9%)
type_tt_initial



<0.001
    chimio 571 (89.9%) 348 (90.2%) 288 (71.6%) 257 (33.0%)
    chimio_avastin 64 (10.1%) 38 (9.8%) 32 (8.0%) 13 (1.7%)
    chimio_immuno 0 (0.0%) 0 (0.0%) 2 (0.5%) 424 (54.4%)
    immuno 0 (0.0%) 0 (0.0%) 80 (19.9%) 85 (10.9%)
Histologic category



<0.001
    epidermoide 303 (47.7%) 143 (37.0%) 124 (30.8%) 246 (31.6%)
    non_epidermoide 332 (52.3%) 243 (63.0%) 278 (69.2%) 532 (68.4%)
    Unknown 0 0 0 1
Patients treated with immunotherapy at any line 58 (9.1%) 194 (50.3%) 244 (60.7%) 599 (76.9%) <0.001
Patients treated with bevacizumab at any line 83 (13.1%) 49 (12.7%) 53 (13.2%) 88 (11.3%) 0.7
1 Median (Q1, Q3); n (%)
2 Kruskal-Wallis rank sum test; Pearson’s Chi-squared test
##Courbe kaplan Meier Population globale
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,] 2202   1862   12.3    11.3    13.3
ggsurvplot(
  km_os,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = FALSE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#2E9FDF"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##Courbe kaplan Meier selon période d'intitation de tt

km_os_periode<-survfit(Surv(os, evt_os)~initiation_period, data=cbnpc)
km_os_periode
## Call: survfit(formula = Surv(os, evt_os) ~ initiation_period, data = cbnpc)
## 
##                                                                     n events
## initiation_period=immunotherapy not available                     635    604
## initiation_period=immunotherapy avilable as 2nd line              386    349
## initiation_period=immunotherapy available as 1st line monotherapy 402    342
## initiation_period=chemo_immunotherapy available as 1st line       779    567
##                                                                   median
## initiation_period=immunotherapy not available                       10.2
## initiation_period=immunotherapy avilable as 2nd line                12.1
## initiation_period=immunotherapy available as 1st line monotherapy   12.2
## initiation_period=chemo_immunotherapy available as 1st line         14.6
##                                                                   0.95LCL
## initiation_period=immunotherapy not available                        9.37
## initiation_period=immunotherapy avilable as 2nd line                 9.63
## initiation_period=immunotherapy available as 1st line monotherapy   10.03
## initiation_period=chemo_immunotherapy available as 1st line         13.33
##                                                                   0.95UCL
## initiation_period=immunotherapy not available                        11.4
## initiation_period=immunotherapy avilable as 2nd line                 14.3
## initiation_period=immunotherapy available as 1st line monotherapy    14.7
## initiation_period=chemo_immunotherapy available as 1st line          17.7
ggsurvplot(
  km_os_periode,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4", "red"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##modèle de cox os 


##analyses univariée

tbl_uvregression(
  cbnpc,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65, initiation_period, young57, maigres, surpoids, obeses,bsa_cap, sexe.cat, imc, immuno, avastin, tt_initial,type_tt_initial, ir30, ir60, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
## There was a warning constructing the model for variable "ir60". See message
## below.
## ! Loglik converged before variable 1 ; coefficient may be infinite.
Characteristic N HR 95% CI p-value
Patients older than 70 years 2,202 1.04 0.94, 1.16 0.443
Patients older than 65 years 2,202 1.05 0.95, 1.15 0.343
period according to immunotherapy availability 2,202


    immunotherapy not available

    immunotherapy avilable as 2nd line
0.92 0.80, 1.05 0.209
    immunotherapy available as 1st line monotherapy
0.83 0.73, 0.95 0.006
    chemo_immunotherapy available as 1st line
0.73 0.65, 0.82 <0.001
Patients younger than 57 years 2,202 0.93 0.84, 1.03 0.163
Patients with BMI <18.5 2,202 1.60 1.40, 1.83 <0.001
Patients with BMI >25 2,202 0.77 0.70, 0.86 <0.001
Patients with BMI >30 2,202 0.76 0.63, 0.90 0.002
Patients with BSA >2 2,202 0.81 0.71, 0.93 0.002
Sex 2,202


    F

    H
1.12 1.02, 1.23 0.022
Body Mass Index at the start of first line 2,202 0.96 0.95, 0.97 <0.001
Patients treated with immunotherapy at any line 2,202 0.63 0.57, 0.69 <0.001
Patients treated with bevacizumab at any line 2,202 0.80 0.70, 0.91 0.001
First line treatment category 2,202


    chimio

    chimio_immuno
0.69 0.61, 0.79 <0.001
    immuno
0.84 0.70, 1.01 0.064
type_tt_initial 2,202


    chimio

    chimio_avastin
0.79 0.66, 0.94 0.009
    chimio_immuno
0.68 0.60, 0.77 <0.001
    immuno
0.82 0.69, 0.99 0.035
Patients with GFR<30 ml/min 2,175 1.81 1.19, 2.75 0.006
Patients with GFR<60 ml/min 2,175 1.00 0.86, 1.16 0.996
Histologic category 2,201


    epidermoide

    non_epidermoide
0.87 0.80, 0.96 0.005
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée 

modsurv<-coxph(Surv(os, evt_os)~tt_initial+
                 sexe.cat+histologie+maigres+surpoids+bsa_cap+
                 ir30+initiation_period, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
First line treatment category


    chimio
    chimio_immuno 0.72 0.60, 0.85 <0.001
    immuno 0.87 0.71, 1.07 0.183
Sex


    F
    H 1.20 1.09, 1.33 <0.001
Histologic category


    epidermoide
    non_epidermoide 0.95 0.86, 1.05 0.283
Patients with BMI <18.5 1.57 1.36, 1.80 <0.001
Patients with BMI >25 0.83 0.74, 0.93 0.001
Patients with BSA >2 0.90 0.77, 1.04 0.155
Patients with GFR<30 ml/min 1.56 1.02, 2.38 0.039
period according to immunotherapy availability


    immunotherapy not available
    immunotherapy avilable as 2nd line 0.92 0.81, 1.06 0.249
    immunotherapy available as 1st line monotherapy 0.88 0.77, 1.01 0.079
    chemo_immunotherapy available as 1st line 0.90 0.78, 1.05 0.186
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée en prenant en compte chimio-avastin

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 sexe.cat+histologie+maigres+surpoids+bsa_cap+
                 ir30+initiation_period, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.78 0.65, 0.94 0.010
    chimio_immuno 0.70 0.59, 0.83 <0.001
    immuno 0.85 0.69, 1.04 0.113
Sex


    F
    H 1.20 1.08, 1.32 <0.001
Histologic category


    epidermoide
    non_epidermoide 0.97 0.88, 1.07 0.562
Patients with BMI <18.5 1.57 1.37, 1.81 <0.001
Patients with BMI >25 0.83 0.74, 0.93 0.001
Patients with BSA >2 0.90 0.77, 1.05 0.173
Patients with GFR<30 ml/min 1.61 1.06, 2.46 0.027
period according to immunotherapy availability


    immunotherapy not available
    immunotherapy avilable as 2nd line 0.92 0.80, 1.05 0.221
    immunotherapy available as 1st line monotherapy 0.88 0.76, 1.01 0.069
    chemo_immunotherapy available as 1st line 0.89 0.77, 1.04 0.140
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sans BSA plafonnée (avec chimio_avastin confondu avec chimio)

modsurv<-coxph(Surv(os, evt_os)~tt_initial+
                 sexe.cat+histologie+maigres+surpoids+
                 ir30+initiation_period, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
First line treatment category


    chimio
    chimio_immuno 0.72 0.60, 0.85 <0.001
    immuno 0.87 0.71, 1.06 0.169
Sex


    F
    H 1.18 1.07, 1.30 <0.001
Histologic category


    epidermoide
    non_epidermoide 0.94 0.86, 1.04 0.255
Patients with BMI <18.5 1.57 1.37, 1.80 <0.001
Patients with BMI >25 0.80 0.72, 0.89 <0.001
Patients with GFR<30 ml/min 1.57 1.03, 2.40 0.037
period according to immunotherapy availability


    immunotherapy not available
    immunotherapy avilable as 2nd line 0.92 0.80, 1.05 0.221
    immunotherapy available as 1st line monotherapy 0.88 0.77, 1.02 0.085
    chemo_immunotherapy available as 1st line 0.90 0.78, 1.05 0.185
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sans BSA plafonnée (avec chimio_avastin identifié)

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 sexe.cat+histologie+maigres+surpoids+
                 ir30+initiation_period, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.78 0.65, 0.94 0.009
    chimio_immuno 0.70 0.59, 0.83 <0.001
    immuno 0.85 0.69, 1.03 0.103
Sex


    F
    H 1.18 1.07, 1.30 0.001
Histologic category


    epidermoide
    non_epidermoide 0.97 0.88, 1.07 0.529
Patients with BMI <18.5 1.57 1.37, 1.81 <0.001
Patients with BMI >25 0.80 0.72, 0.89 <0.001
Patients with GFR<30 ml/min 1.62 1.06, 2.48 0.025
period according to immunotherapy availability


    immunotherapy not available
    immunotherapy avilable as 2nd line 0.92 0.80, 1.05 0.196
    immunotherapy available as 1st line monotherapy 0.88 0.76, 1.01 0.073
    chemo_immunotherapy available as 1st line 0.89 0.77, 1.04 0.139
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Multivariée sans la période

modsurv<-coxph(Surv(os, evt_os)~tt_initial+
                 sexe.cat+histologie+maigres+surpoids+
                 ir30, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
First line treatment category


    chimio
    chimio_immuno 0.69 0.61, 0.79 <0.001
    immuno 0.83 0.69, 1.00 0.046
Sex


    F
    H 1.19 1.08, 1.31 <0.001
Histologic category


    epidermoide
    non_epidermoide 0.94 0.85, 1.04 0.212
Patients with BMI <18.5 1.57 1.36, 1.80 <0.001
Patients with BMI >25 0.80 0.72, 0.88 <0.001
Patients with GFR<30 ml/min 1.61 1.05, 2.45 0.028
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Multivariée sans la période avec chimio avastin

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 sexe.cat+histologie+maigres+surpoids+
                 ir30, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.79 0.66, 0.95 0.011
    chimio_immuno 0.67 0.59, 0.76 <0.001
    immuno 0.80 0.66, 0.97 0.021
Sex


    F
    H 1.19 1.07, 1.31 <0.001
Histologic category


    epidermoide
    non_epidermoide 0.96 0.87, 1.06 0.461
Patients with BMI <18.5 1.57 1.37, 1.81 <0.001
Patients with BMI >25 0.80 0.72, 0.88 <0.001
Patients with GFR<30 ml/min 1.66 1.09, 2.53 0.019
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sans l'histologie = modèle final avec chimio_avastin 1ere ligne

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 sexe.cat+maigres+surpoids+
                 ir30, data=cbnpc)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.78 0.65, 0.93 0.007
    chimio_immuno 0.66 0.58, 0.75 <0.001
    immuno 0.80 0.67, 0.96 0.019
Sex


    F
    H 1.19 1.08, 1.31 <0.001
Patients with BMI <18.5 1.57 1.37, 1.80 <0.001
Patients with BMI >25 0.79 0.72, 0.88 <0.001
Patients with GFR<30 ml/min 1.66 1.09, 2.54 0.018
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
hist(resid(modsurv), col="grey", main="")

##Analyse en sous groupes 
###patients traités par immuno 1st line
immunofirst<-filter(cbnpc, c(tt_initial=="immuno" ))

####Description population immuno 1ere ligne 
tbl_summary(
  immunofirst, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                     "imc","maigres","surpoids","obeses","bsa_cap","dfg_ml_min","ir30" ,
                     "protocole_generique_initiation","histologie",
                     "avastin"),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 1651
Age at the start of first line 67 (61, 74)
Patients older than 65 years 94 (57.0%)
Patients older than 70 years 60 (36.4%)
Patients younger than 57 years 26 (15.8%)
Sex
    F 57 (34.5%)
    H 108 (65.5%)
Body weight at the start of first line 65 (55, 75)
Body Mass Index at the start of first line 22.7 (20.1, 25.3)
Patients with BMI <18.5 23 (13.9%)
Patients with BMI >25 45 (27.3%)
Patients with BMI >30 8 (4.8%)
Patients with BSA >2 22 (13.3%)
Glomerular filtration Rate at the start of first line 90 (71, 106)
    Unknown 8
Patients with GFR<30 ml/min 5 (3.2%)
    Unknown 8
First line treatment
    cemiplimab 8 (4.8%)
    pembrolizumab 157 (95.2%)
Histologic category
    epidermoide 35 (21.3%)
    non_epidermoide 129 (78.7%)
    Unknown 1
Patients treated with bevacizumab at any line 2 (1.2%)
1 Median (Q1, Q3); n (%)
##Courbe kaplan Meier Population immuno mono 1ere ligne
km_os_immunofirst<-survfit(Surv(immunofirst$os, immunofirst$evt_os)~1)
km_os_immunofirst
## Call: survfit(formula = Surv(immunofirst$os, immunofirst$evt_os) ~ 
##     1)
## 
##        n events median 0.95LCL 0.95UCL
## [1,] 165    128   11.2     8.7    17.1
ggsurvplot(
  km_os_immunofirst,                     # survfit object with calculated statistics.
  data = immunofirst,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = FALSE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#2E9FDF"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##modèle de cox os population immuno mono 1ere ligne


##analyses univariée

tbl_uvregression(
  immunofirst,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65,young57, maigres, surpoids, obeses,bsa_cap, sexe.cat,ir30, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic N HR 95% CI p-value
Patients older than 70 years 165 1.07 0.74, 1.53 0.727
Patients older than 65 years 165 1.10 0.78, 1.57 0.577
Patients younger than 57 years 165 1.08 0.67, 1.73 0.766
Patients with BMI <18.5 165 1.17 0.71, 1.93 0.528
Patients with BMI >25 165 0.82 0.55, 1.21 0.317
Patients with BMI >30 165 0.73 0.32, 1.65 0.447
Patients with BSA >2 165 0.63 0.37, 1.08 0.094
Sex 165


    F

    H
1.32 0.91, 1.91 0.147
Patients with GFR<30 ml/min 157 3.03 1.23, 7.47 0.016
Histologic category 164


    epidermoide

    non_epidermoide
0.87 0.58, 1.32 0.523
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##patients traités par chimio-immuno 1st line
chimioimmunofirst<-filter(cbnpc, c(tt_initial=="chimio_immuno" ))

####Description population chimio immuno 1ere ligne
tbl_summary(
  chimioimmunofirst, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                           "imc","maigres","surpoids","obeses","bsa_cap","dfg_ml_min","ir30", 
                           "protocole_generique_initiation","histologie",
                          ),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 4261
Age at the start of first line 62 (56, 68)
Patients older than 65 years 164 (38.5%)
Patients older than 70 years 84 (19.7%)
Patients younger than 57 years 118 (27.7%)
Sex
    F 160 (37.6%)
    H 266 (62.4%)
Body weight at the start of first line 66 (56, 76)
Body Mass Index at the start of first line 22.8 (20.0, 25.6)
Patients with BMI <18.5 57 (13.4%)
Patients with BMI >25 123 (28.9%)
Patients with BMI >30 37 (8.7%)
Patients with BSA >2 60 (14.1%)
Glomerular filtration Rate at the start of first line 96 (83, 107)
Patients with GFR<30 ml/min
    0 426 (100.0%)
First line treatment
    platine_alimta_atezo 2 (0.5%)
    platine_alimta_nivolumab 6 (1.4%)
    platine_alimta_pembro 346 (81.2%)
    platine_gemcitabine_nivolumab 2 (0.5%)
    platine_taxol_atezo 8 (1.9%)
    platine_taxol_nivolumab 2 (0.5%)
    platine_taxol_pembro 60 (14.1%)
Histologic category
    epidermoide 72 (16.9%)
    non_epidermoide 354 (83.1%)
1 Median (Q1, Q3); n (%)
##Courbe kaplan Meier Population chimio immuno mono 1ere ligne
km_os_chimioimmunofirst<-survfit(Surv(chimioimmunofirst$os, chimioimmunofirst$evt_os)~1)
km_os_chimioimmunofirst
## Call: survfit(formula = Surv(chimioimmunofirst$os, chimioimmunofirst$evt_os) ~ 
##     1)
## 
##        n events median 0.95LCL 0.95UCL
## [1,] 426    289   18.3      15    20.2
ggsurvplot(
  km_os_chimioimmunofirst,                     # survfit object with calculated statistics.
  data = chimioimmunofirst,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = FALSE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#2E9FDF"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##modèle de cox os population chimio immuno 1ere ligne


##analyses univariée

tbl_uvregression(
  chimioimmunofirst,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65,young57, maigres, surpoids, obeses,"bsa_cap", sexe.cat,avastin, ir30, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic N HR 95% CI p-value
Patients older than 70 years 426 1.01 0.75, 1.34 0.965
Patients older than 65 years 426 1.05 0.83, 1.33 0.694
Patients younger than 57 years 426 1.01 0.78, 1.31 0.927
Patients with BMI <18.5 426 1.26 0.90, 1.75 0.171
Patients with BMI >25 426 0.97 0.76, 1.26 0.837
Patients with BMI >30 426 1.06 0.71, 1.59 0.765
Patients with BSA >2 426 0.95 0.68, 1.33 0.769
Sex 426


    F

    H
1.06 0.83, 1.34 0.654
Patients treated with bevacizumab at any line 426 0.98 0.72, 1.34 0.906
Patients with GFR<30 ml/min 426


Histologic category 426


    epidermoide

    non_epidermoide
0.85 0.62, 1.15 0.290
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
#patients traités par chimio 1st line
chimio<-filter(cbnpc, c(type_tt_initial=="chimio" ))

####Description population chimio immuno 1ere ligne
tbl_summary(
  chimio, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                                 "imc","maigres","surpoids","obeses","bsa_cap","dfg_ml_min","ir30", 
                                 "protocole_generique_initiation","histologie",
                                 ),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 1,4641
Age at the start of first line 63 (57, 70)
Patients older than 65 years 635 (43.4%)
Patients older than 70 years 388 (26.5%)
Patients younger than 57 years 389 (26.6%)
Sex
    F 498 (34.0%)
    H 966 (66.0%)
Body weight at the start of first line 66 (57, 76)
Body Mass Index at the start of first line 23.0 (20.0, 25.9)
Patients with BMI <18.5 190 (13.0%)
Patients with BMI >25 470 (32.1%)
Patients with BMI >30 119 (8.1%)
Patients with BSA >2 215 (14.7%)
Glomerular filtration Rate at the start of first line 89 (74, 103)
    Unknown 18
Patients with GFR<30 ml/min 16 (1.1%)
    Unknown 18
First line treatment
    platine_alimta 773 (52.8%)
    platine_docetaxel 56 (3.8%)
    platine_gemcitabine 77 (5.3%)
    platine_taxol 247 (16.9%)
    platine_vinorelbine 311 (21.2%)
Histologic category
    epidermoide 691 (47.2%)
    non_epidermoide 773 (52.8%)
1 Median (Q1, Q3); n (%)
##Courbe kaplan Meier Population chimio immuno mono 1ere ligne
km_os_chimio<-survfit(Surv(chimio$os, chimio$evt_os)~1)
km_os_chimio
## Call: survfit(formula = Surv(chimio$os, chimio$evt_os) ~ 1)
## 
##         n events median 0.95LCL 0.95UCL
## [1,] 1464   1313   10.5     9.5    11.4
ggsurvplot(
  km_os_chimio,                     # survfit object with calculated statistics.
  data = chimio,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = FALSE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#2E9FDF"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##modèle de cox os population chimio  1ere ligne


##analyses univariée

tbl_uvregression(
  chimio,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65,young57, maigres, surpoids, obeses,bsa_cap, sexe.cat,ir30, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic N HR 95% CI p-value
Patients older than 70 years 1,464 1.01 0.90, 1.15 0.823
Patients older than 65 years 1,464 1.03 0.93, 1.15 0.573
Patients younger than 57 years 1,464 0.92 0.81, 1.04 0.168
Patients with BMI <18.5 1,464 1.83 1.57, 2.15 <0.001
Patients with BMI >25 1,464 0.71 0.64, 0.80 <0.001
Patients with BMI >30 1,464 0.70 0.57, 0.86 <0.001
Patients with BSA >2 1,464 0.80 0.69, 0.94 0.005
Sex 1,464


    F

    H
1.10 0.98, 1.23 0.102
Patients with GFR<30 ml/min 1,446 1.67 1.02, 2.73 0.042
Histologic category 1,464


    epidermoide

    non_epidermoide
0.98 0.88, 1.09 0.662
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
#patients traités par chimio_avastin 1st line
chimio_beva<-filter(cbnpc, c(type_tt_initial=="chimio_avastin" ))

####Description population chimio immuno 1ere ligne
tbl_summary(
  chimio_beva, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                      "imc","maigres","surpoids","obeses","bsa_cap","dfg_ml_min","ir30", 
                      "protocole_generique_initiation","histologie",
  ),
  digits=all_categorical()~ c(0,1)
)
Characteristic N = 1471
Age at the start of first line 61 (56, 66)
Patients older than 65 years 43 (29.3%)
Patients older than 70 years 15 (10.2%)
Patients younger than 57 years 44 (29.9%)
Sex
    F 67 (45.6%)
    H 80 (54.4%)
Body weight at the start of first line 66 (56, 77)
Body Mass Index at the start of first line 23.4 (19.9, 25.8)
Patients with BMI <18.5 19 (12.9%)
Patients with BMI >25 49 (33.3%)
Patients with BMI >30 10 (6.8%)
Patients with BSA >2 25 (17.0%)
Glomerular filtration Rate at the start of first line 92 (77, 103)
    Unknown 1
Patients with GFR<30 ml/min 1 (0.7%)
    Unknown 1
First line treatment
    platine_alimta_avastin 129 (87.8%)
    platine_gemcitabine_avastin 6 (4.1%)
    platine_taxol_avastin 12 (8.2%)
Histologic category
    epidermoide 18 (12.2%)
    non_epidermoide 129 (87.8%)
1 Median (Q1, Q3); n (%)
##Courbe kaplan Meier Population chimio immuno mono 1ere ligne
km_os_chimio_beva<-survfit(Surv(chimio_beva$os, chimio_beva$evt_os)~1)
km_os_chimio_beva
## Call: survfit(formula = Surv(chimio_beva$os, chimio_beva$evt_os) ~ 
##     1)
## 
##        n events median 0.95LCL 0.95UCL
## [1,] 147    132   18.1    15.3    22.7
ggsurvplot(
  km_os_chimio_beva,                     # survfit object with calculated statistics.
  data = chimio_beva,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = FALSE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#2E9FDF"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##modèle de cox os population chimio  1ere ligne


##analyses univariée

tbl_uvregression(
  chimio_beva,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65,young57, maigres, surpoids, obeses,bsa_cap, sexe.cat,ir30, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic N HR 95% CI p-value
Patients older than 70 years 147 0.82 0.47, 1.43 0.490
Patients older than 65 years 147 0.84 0.57, 1.22 0.354
Patients younger than 57 years 147 0.82 0.56, 1.20 0.307
Patients with BMI <18.5 147 1.69 1.03, 2.75 0.036
Patients with BMI >25 147 0.74 0.51, 1.08 0.117
Patients with BMI >30 147 0.65 0.33, 1.28 0.212
Patients with BSA >2 147 0.82 0.51, 1.30 0.395
Sex 147


    F

    H
1.07 0.76, 1.51 0.690
Patients with GFR<30 ml/min 146 0.46 0.06, 3.31 0.442
Histologic category 147


    epidermoide

    non_epidermoide
0.96 0.58, 1.60 0.872
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##Courbe kaplan Meier selon période d'intitation de tt

km__chimio_periode<-survfit(Surv(os, evt_os)~initiation_period, data=chimio)
km__chimio_periode
## Call: survfit(formula = Surv(os, evt_os) ~ initiation_period, data = chimio)
## 
##                                                                     n events
## initiation_period=immunotherapy not available                     571    541
## initiation_period=immunotherapy avilable as 2nd line              348    316
## initiation_period=immunotherapy available as 1st line monotherapy 288    248
## initiation_period=chemo_immunotherapy available as 1st line       257    208
##                                                                   median
## initiation_period=immunotherapy not available                        9.7
## initiation_period=immunotherapy avilable as 2nd line                11.2
## initiation_period=immunotherapy available as 1st line monotherapy   12.2
## initiation_period=chemo_immunotherapy available as 1st line         10.3
##                                                                   0.95LCL
## initiation_period=immunotherapy not available                        8.83
## initiation_period=immunotherapy avilable as 2nd line                 9.17
## initiation_period=immunotherapy available as 1st line monotherapy    9.43
## initiation_period=chemo_immunotherapy available as 1st line          8.27
##                                                                   0.95UCL
## initiation_period=immunotherapy not available                        10.9
## initiation_period=immunotherapy avilable as 2nd line                 13.8
## initiation_period=immunotherapy available as 1st line monotherapy    14.9
## initiation_period=chemo_immunotherapy available as 1st line          13.7
ggsurvplot(
  km__chimio_periode,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4", "red"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

#Courbe de Kaplan Meier selon tt initial


##Courbe kaplan Meier selon type de tt

km_os_tt_initial<-survfit(Surv(os, evt_os)~tt_initial, data=cbnpc)
km_os_tt_initial
## Call: survfit(formula = Surv(os, evt_os) ~ tt_initial, data = cbnpc)
## 
##                             n events median 0.95LCL 0.95UCL
## tt_initial=chimio        1611   1445   11.0    10.1    12.2
## tt_initial=chimio_immuno  426    289   18.3    15.0    20.2
## tt_initial=immuno         165    128   11.2     8.7    17.1
ggsurvplot(
  km_os_tt_initial,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##Courbe kaplan Meier selon type de tt en prenant en compte chimio_avastin

km_os_type_tt_initial<-survfit(Surv(os, evt_os)~type_tt_initial, data=cbnpc)
km_os_type_tt_initial
## Call: survfit(formula = Surv(os, evt_os) ~ type_tt_initial, data = cbnpc)
## 
##                                   n events median 0.95LCL 0.95UCL
## type_tt_initial=chimio         1464   1313   10.5     9.5    11.4
## type_tt_initial=chimio_avastin  147    132   18.1    15.3    22.7
## type_tt_initial=chimio_immuno   426    289   18.3    15.0    20.2
## type_tt_initial=immuno          165    128   11.2     8.7    17.1
ggsurvplot(
  km_os_type_tt_initial,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4", "purple"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

###Analyse de la période depuis AMM chimio-immuno 1ere ligne 
moderne<-filter(cbnpc, c(periode==4))


##descriptif population selon traitement de 1ere ligne ere moderne

tbl_summary(
  moderne, include = c("age_initiation", "old65","old70","young57","sexe.cat","poids",
                     "imc","maigres","obeses","bsa_cap","dfg_ml_min", 
                     "histologie",
                     "imc","immuno"),
  by="type_tt_initial", 
  digits=all_categorical()~ c(0,1)
)%>%
  add_p()
Characteristic chimio
N = 257
1
chimio_avastin
N = 13
1
chimio_immuno
N = 424
1
immuno
N = 85
1
p-value2
Age at the start of first line 68 (60, 74) 63 (50, 70) 62 (56, 68) 68 (62, 77) <0.001
Patients older than 65 years 149 (58.0%) 5 (38.5%) 163 (38.4%) 52 (61.2%) <0.001
Patients older than 70 years 108 (42.0%) 4 (30.8%) 84 (19.8%) 33 (38.8%) <0.001
Patients younger than 57 years 44 (17.1%) 5 (38.5%) 117 (27.6%) 12 (14.1%) <0.001
Sex



0.10
    F 98 (38.1%) 8 (61.5%) 158 (37.3%) 24 (28.2%)
    H 159 (61.9%) 5 (38.5%) 266 (62.7%) 61 (71.8%)
Body weight at the start of first line 65 (57, 76) 64 (60, 80) 66 (56, 77) 65 (55, 76) >0.9
Body Mass Index at the start of first line 22.8 (19.9, 25.9) 24.3 (21.5, 24.5) 22.8 (20.0, 25.6) 22.8 (20.1, 25.8) >0.9
Patients with BMI <18.5 32 (12.5%) 1 (7.7%) 57 (13.4%) 14 (16.5%) 0.8
Patients with BMI >30 16 (6.2%) 0 (0.0%) 37 (8.7%) 7 (8.2%) 0.6
Patients with BSA >2 35 (13.6%) 2 (15.4%) 60 (14.2%) 13 (15.3%) >0.9
Glomerular filtration Rate at the start of first line 90 (75, 103) 93 (82, 105) 96 (83, 107) 86 (59, 98) <0.001
    Unknown 0 0 0 6
Histologic category



<0.001
    epidermoide 158 (61.5%) 0 (0.0%) 71 (16.7%) 17 (20.2%)
    non_epidermoide 99 (38.5%) 13 (100.0%) 353 (83.3%) 67 (79.8%)
    Unknown 0 0 0 1
Patients treated with immunotherapy at any line 91 (35.4%) 4 (30.8%) 419 (98.8%) 85 (100.0%) <0.001
1 Median (Q1, Q3); n (%)
2 Kruskal-Wallis rank sum test; Pearson’s Chi-squared test; Fisher’s exact test
##Courbe kaplan Meier selon traitement initial période moderne uniquement (à partir de dec 2019)

km_os_moderne<-survfit(Surv(os, evt_os)~tt_initial, data=moderne)
km_os_moderne
## Call: survfit(formula = Surv(os, evt_os) ~ tt_initial, data = moderne)
## 
##                            n events median 0.95LCL 0.95UCL
## tt_initial=chimio        270    216   10.4     8.3    13.9
## tt_initial=chimio_immuno 424    288   18.3    15.0    20.2
## tt_initial=immuno         85     63   13.6     9.0    26.1
ggsurvplot(
  km_os_moderne,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##Courbe kaplan Meier selon type de traitement initial période moderne uniquement (à partir de dec 2019)

km_os_moderne_tt<-survfit(Surv(os, evt_os)~type_tt_initial, data=moderne)
km_os_moderne_tt
## Call: survfit(formula = Surv(os, evt_os) ~ type_tt_initial, data = moderne)
## 
##                                  n events median 0.95LCL 0.95UCL
## type_tt_initial=chimio         257    208   10.3    8.27    13.7
## type_tt_initial=chimio_avastin  13      8   20.3    6.33      NA
## type_tt_initial=chimio_immuno  424    288   18.3   15.00    20.2
## type_tt_initial=immuno          85     63   13.6    9.00    26.1
ggsurvplot(
  km_os_moderne_tt,                     # survfit object with calculated statistics.
  data = cbnpc,             # data used to fit survival curves.
  risk.table = TRUE,       # show risk table.
  pval = TRUE,             # show p-value of log-rank test.
  conf.int = TRUE,         # show confidence intervals for 
  # point estimates of survival curves.
  palette = c("#E7B800", "#2E9FDF", "green4", "purple"),
  xlim = c(0,66),         # present narrower X axis, but not affect
  # survival estimates.
  xlab = "Time in months",   # customize X axis label.
  break.time.by = 6,     # break X axis in time intervals by 500.
  ggtheme = theme_light(), # customize plot and risk table with a theme.
  risk.table.y.text.col = T,# colour risk table text annotations.
  risk.table.height = 0.25, # the height of the risk table
  risk.table.y.text = FALSE,# show bars instead of names in text annotations
  # in legend of risk table.
  ncensor.plot = FALSE,      # plot the number of censored subjects at time t
  ncensor.plot.height = 0.25,
  conf.int.style = "step",  # customize style of confidence intervals
  surv.median.line = "hv",  # add the median survival pointer.
  #legend.labs =
  #c("no", "yes")    # change legend labels.
)
## Ignoring unknown labels:
## • colour : "Strata"

##Analyse de Cox univariée sur période moderne 
tbl_uvregression(
  moderne,
  method = coxph,
  y = Surv(os, evt_os),
  exponentiate = TRUE,
  include = c(old70, old65, young57, maigres, surpoids, obeses,bsa_cap, sexe.cat, imc, immuno, type_tt_initial, ir30, ir60, histologie),
  pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic N HR 95% CI p-value
Patients older than 70 years 779 1.15 0.96, 1.37 0.133
Patients older than 65 years 779 1.20 1.02, 1.41 0.031
Patients younger than 57 years 779 0.84 0.68, 1.02 0.081
Patients with BMI <18.5 779 1.61 1.28, 2.04 <0.001
Patients with BMI >25 779 0.80 0.67, 0.96 0.019
Patients with BMI >30 779 0.85 0.62, 1.17 0.323
Patients with BSA >2 779 0.81 0.64, 1.04 0.095
Sex 779


    F

    H
1.08 0.91, 1.28 0.382
Body Mass Index at the start of first line 779 0.97 0.95, 0.99 0.002
Patients treated with immunotherapy at any line 779 0.69 0.57, 0.84 <0.001
type_tt_initial 779


    chimio

    chimio_avastin
0.59 0.29, 1.20 0.145
    chimio_immuno
0.71 0.59, 0.85 <0.001
    immuno
0.79 0.59, 1.05 0.099
Patients with GFR<30 ml/min 773 2.63 1.36, 5.09 0.004
Patients with GFR<60 ml/min 773 1.44 1.07, 1.92 0.015
Histologic category 778


    epidermoide

    non_epidermoide
0.76 0.64, 0.90 0.002
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sur période moderne

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 histologie+maigres+surpoids+young57+
                 ir30, data=moderne)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.68 0.33, 1.40 0.299
    chimio_immuno 0.74 0.60, 0.90 0.003
    immuno 0.81 0.60, 1.10 0.174
Histologic category


    epidermoide
    non_epidermoide 0.87 0.71, 1.06 0.174
Patients with BMI <18.5 1.66 1.30, 2.12 <0.001
Patients with BMI >25 0.82 0.68, 1.00 0.048
Patients younger than 57 years 0.82 0.67, 1.01 0.057
Patients with GFR<30 ml/min 2.30 1.18, 4.49 0.014
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sans histologie

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 maigres+surpoids+young57+
                 ir30, data=moderne)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.63 0.31, 1.28 0.200
    chimio_immuno 0.69 0.58, 0.83 <0.001
    immuno 0.78 0.59, 1.05 0.098
Patients with BMI <18.5 1.64 1.29, 2.10 <0.001
Patients with BMI >25 0.82 0.68, 0.99 0.041
Patients younger than 57 years 0.81 0.66, 1.0 0.045
Patients with GFR<30 ml/min 2.36 1.21, 4.60 0.011
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio
##analyses Mutlivariée sans histologie avec dfg<60 à la place de dfg<30

modsurv<-coxph(Surv(os, evt_os)~type_tt_initial+
                 maigres+surpoids+young57+
                 ir60, data=moderne)
modsurv%>%tbl_regression(
  exponentiate = TRUE,pvalue_fun = scales::label_pvalue(accuracy = .001)
)
Characteristic HR 95% CI p-value
type_tt_initial


    chimio
    chimio_avastin 0.64 0.31, 1.29 0.211
    chimio_immuno 0.70 0.58, 0.84 <0.001
    immuno 0.77 0.57, 1.03 0.076
Patients with BMI <18.5 1.64 1.29, 2.10 <0.001
Patients with BMI >25 0.83 0.68, 1.00 0.050
Patients younger than 57 years 0.82 0.67, 1.01 0.058
Patients with GFR<60 ml/min 1.28 0.94, 1.73 0.117
Abbreviations: CI = Confidence Interval, HR = Hazard Ratio