Introduction

This book is designed to collect notes and exercises from the Ph.D. course on Survival Data Analysis for Cancer Data by prof. Sylvie Chevret and prof. Matthieu Resche-Rigon from ECSTRRA Team, Inserm, University of Paris Diderot, promoted by the Dep. of Mathematical Sciences “G. L. Lagrange” of the Politecnico of Torino (Italy).

Contributions

Any contribution is welcome! From the download button on the top of each (HTML) page you can download both the epub and the PDF versions of the present book.

If you find any mistake/typo or want to share ideas, you can help improve the book in the following way:

Settings

Here, there are the libraries loaded during the course, w/ the relative options, plus some packages and options useful to write code more understandable by humans obtaining nicer output.

# Packages for the analyses
library(survival)                                            # Survival Analysis
library(survminer)                     # Drawing Survival Curves using 'ggplot2'
library(cmprsk)                                                 # Competing risk
library(rms)              # Regression Modeling Strategy (include Hmisc package)
  options(datadist = 'dd')                  # Distribution Summaries used by rms

# Package(s) for data management 
library(tidyverse)                    # Imports the principal tidyverse packages

# Document output options
knitr::opts_chunk$set(
    echo        = TRUE,                                      # Render all the code
    message     = FALSE,                                  # Do net render messages
    warning     = FALSE,                                  # Do not render warnings
    fig.height  = 4.4,   # Right figure height to permit two figures in a PDF page
    cache.extra = knitr::rand_seed   # cache random seed to assure reproducibility
)

The following code create the packages.bib files which is the BibTeX lists of all the packages references we have loaded.

# Automatically create a bib database for the loaded packages
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown'),
  file = 'packages.bib'
)