%                             Intro for Survival Analysis (312s2019)

\documentclass[serif]{beamer} % Serif for Computer Modern math font.
% \documentclass[serif, handout]{beamer} % Handout mode to ignore pause statements
\hypersetup{colorlinks,linkcolor=,urlcolor=red}

\usefonttheme{serif} % Looks like Computer Modern for non-math text -- nice!
\setbeamertemplate{navigation symbols}{} % Supress navigation symbols
\usetheme{AnnArbor}  % CambridgeUS Blue and yellow, Shows current section title
% \usetheme{Berlin} % Blue: Displays section titles on top
% \usetheme{Frankfurt}  % Displays section titles on top: Fairly thin but still swallows some material at bottom of crowded slides
\usepackage[english]{babel}
% \definecolor{links}{HTML}{2A1B81}
% \definecolor{links}{red}

\setbeamertemplate{footline}[frame number] 

\mode<presentation>
% \mode<handout>{\setbeamercolor{background canvas}{bg=black!5}}


\title{Survival Analysis\footnote{See last slide for copyright information.}}
\subtitle{STA312 Spring 2019}
\date{} % To suppress date


\begin{document}

\begin{frame}
  \titlepage
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Survival Time Data} \pause
%\framesubtitle{} 
  \begin{itemize}
    \item Data could be from cancer patients who have undergone some treatment. \pause
    \item The outcome (dependent variable, response variable) will be length of time until death. \pause
    \item Does not have to be a bad event, and it does not have to be medical. \pause
    \item Response variable could be time required for an unemployed person to find work. \pause
    \item Length of time a prisoner actually spends in jail. \pause
    \item Time required for a lightbulb to burn out. \pause
    \item Generally, ``time-to-event" data. \pause
    \item But much of the terminology and notation assumes it's survival time \pause -- time until death.
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{What makes survival analysis special?}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item Time $T$ is a continuous random variable with $P(T>0)=1$. \pause 
    \item That is, it's positive-valued. \pause
    \item More important is \emph{censoring}.
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Censoring}
\framesubtitle{Some of the times cannot be observed exactly.} \pause
  \begin{itemize}
    \item In a cancer study, it's impractical to wait for all the patients to die. \pause
    \item Patient 172 was diagnosed 6 years ago, and she's still alive. \pause
    \item The study's over. \pause
    \item What do you record for Patient 172? \pause A six? \pause
    \item That's no good. We know she lived more than 6 years. \pause
    \item We just don't know how much more. \pause
    \item Giving her a 6 would bias the results downward, toward shorter average survival times. \pause
    \item How about discarding her data altogether, because it's incomplete? \pause
    \item That's even worse. 
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[fragile]
\frametitle{What do censored data look like?}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item Let $T^*$ represent time to failure. \pause
    \item Let $U$ represent censoring time. \pause
    \item We observe $T=\min(T^*,U)$. \pause
    \item And an indicator for whether failure occurred: \pause $\delta \pause = 1$ if  uncensored\pause, and zero if censored. \pause
    \item All this is $i=1, \ldots,n$,\pause ~so we observe $n$ pairs \pause $(T_1,\delta_1), (T_2,\delta_2), \ldots, (T_n,\delta_n)$.  \pause
    \item A simple data file might look like this:
  \end{itemize}
\begin{verbatim} 
Patient     Time        Uncensored (delta)
    1         5             1
    2         6             0
    3         8             1
    4         3             1
    5        22             1
\end{verbatim}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Types of censoring}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item \textbf{Right censoring}: \pause Event happened after some specified time. \pause
    \item Example: Ex-con dies of drug overdose before being re-arrested. \pause
    \item \textbf{Left censoring}: \pause Event happened before some specified time.  \pause 
    \item Example: Person is known to have died before some date because that's when the obituary appeared. \pause 
    \item \textbf{Interval censoring}: \pause Event happened between time $A$ and time $B$. \pause 
    \item Example: Cancer came back between two monthly check-ups.
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{More types of censoring}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item \textbf{Type I censoring}: \pause Censoring times are pre-specified. \pause In a smoking cessation study, \pause  participants are followed until they relapse or 180 days, whichever comes first. \pause
    \item \textbf{Type II censoring}: \pause Subjects are followed until a specified fraction fail. \pause Mostly used in industrial settings. \pause
    \item \textbf{Random censoring}: \pause  Drop-out happens according to some probability distribution, usually unknown. 
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Random censoring}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item In random censoring, it is critical that the cause of drop-out be unrelated to the process being studied. \pause
    \item For example, if a paient withdraws from the study (before death) because she is too sick to participate,\pause ~the result can be biased estimation and inference. \pause
    \item A good design is common in medical studies. \pause Patients are continuously enrolled in the study, \pause and anyone still alive when the study ends \pause is censored. \pause
    \item[]
    \item In this course, we will focus on \emph{right censored} data with \emph{random censoring}.
  \end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Roadmap}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item Single sample, parametric. \pause
%    \item Multi-sample, parametric. \pause
    \item Single sample, non-parametric. \pause
%    \item Multi-sample, non-parametric. \pause
    \item With explanatory variables, parametric. \pause
    \item With explanatory variables, non-parametric.
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Tools}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item Maximum likelihood.\pause
    \item A little large sample theory. \pause
    \item R.
  \end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
\frametitle{Copyright Information}

This slide show was prepared by  \href{http://www.utstat.toronto.edu/~brunner}{Jerry Brunner},
Department of Statistics, University of Toronto. It is licensed under a 
\href{http://creativecommons.org/licenses/by-sa/3.0/deed.en_US}
     {Creative Commons Attribution - ShareAlike 3.0 Unported License}. Use any part of it as you like and share the result freely. The \LaTeX~source code is available from the course website:
\href{http://www.utstat.toronto.edu/~brunner/oldclass/312s19} {\footnotesize \texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/312s19}}

\end{frame}


\end{document}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{}\pause
%\framesubtitle{} 
  \begin{itemize}
    \item \pause
    \item \pause
    \item 
  \end{itemize}
\end{frame}




