%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Beamer Presentation
% LaTeX Template
% Version 1.0 (10/11/12)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Changed theme to WSU by William King
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND THEMES
%----------------------------------------------------------------------------------------

\documentclass[xcolor=dvipsnames,aspectratio=169]{beamer}


%Import Preamble bits
\input{../assets/preambles/FormattingPreamble.tex}
\input{../assets/preambles/TikzitPreamble.tex}
\input{../assets/preambles/MathPreamble.tex}
\input{../assets/preambles/BibPreamble.tex}
\input{../assets/preambles/GeneralPreamble.tex}




%----------------------------------------------------------------------------------------
%	TITLE PAGE
%----------------------------------------------------------------------------------------

\title[Clinical Trials]{The Effects of Market Conditions on Recruitment and Completion of Clinical Trials} 

\author{Will King} % Your name
\institute[WSU] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{
Washington State University \\ % Your institution for the title page
\medskip
\textit{william.f.king@wsu.edu} % Your email address
}
\date{\today} % Date, can be changed to a custom date





\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
%----------------------------------
\begin{frame} %Allow frame breaks
\frametitle{Clincial Trials} % Table of contents slide, comment this out to remove it
    % - Intro and hook (Clinical Trials are key part of pharmacological pipeline)
    Pharmaceuticals are a frequently discussed aspect of health care cost managment.
    Their development is dictated by scientific and regulatory hurdles 
    including passing clinical trials
    (\cite{noauthor_fda_nodate}), 
    while their market is characterized by strategic competition and ambiguous 
    patent protection
    (\cite{van_der_gronde_addressing_2017}).

    \vspace{12pt}

    This research investigates the pathways by which market conditions
    affect clinical trial completion.
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{This research}
    \textbf{Questions:} 
    \begin{enumerate}
        \item Does the existence of alternative drugs on the market make it
            harder for clinical trials to complete successfully? 
        \item How much of this is occurs due to increased recruitment difficulty?
    \end{enumerate}
    
\end{frame}
%--------------------------------
\begin{frame}
\frametitle{Thanks} % Table of contents slide, comment this out to remove it
    Thanks to Chris Adams and Rebecca Sachs of the Congressional Budget Office.
\end{frame}
%--------------------------------
\begin{frame}[allowframebreaks] %Allow frame breaks
\frametitle{Overview} % Table of contents slide, comment this out to remove it
\tableofcontents 
% - Intro and hook
% - Literature review
% - Causal Identification
% - Data
% - Econometric model
% - Results
% - Improvements
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Lit Review %%%%%%%%%%%%%%%%%%%%%%%%
\section{Lit Review}
% First slide:
%-------------------------------------------------------------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Literature Highlights}
    \begin{itemize}
        \item \cite{van_der_gronde_addressing_2017}: 
            High level synthesis of overall discussion regarding drug costs. 
            Both academic and non-academic sources.
        \item \cite{hwang_failure_2016}:
            Answered the question "Why do late-stage (phase III) trials fail?"
            Found that efficacy, safety, and competition reasons accounted for 
            57\%, 17\%, and 22\% respectively.
        \item \cite{abrantes-metz_pharmaceutical_2004}:
            Described how drugs progress through the 3 phases of clinical trials
            and correllations between various trial characteristics and the 
            clinical trial failures.
        \item \cite{khmelnitskaya_competition_2021}: 
            Modeled clinical trial lifecycle of drugs, found method to separate
            scientific from competitive reasons for failure to progress to the 
            next phase.
%        \item \cite{}: 

    \end{itemize}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{This research, in context}

    In contrast to previous work looking at multiple phases of trials,
    I seek to figure out what causes individual trials to fail.

    \vspace{12pt}

    Instead of focusing on the drug development pipeline, I attempt to 
    investigate the population of drug-based, phase III trials.
\end{frame}
%-------------------------------
\begin{frame} %Allow frame breaks
\frametitle{Why this approach?} % Table of contents slide, comment this out to remove it

    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/methodology_trial.png}
        \label{FIG:xkcd2726}
        \caption{``If you think THAT'S unethical, you should see the stuff we approved via our Placebo IRB.'' 
        - \url{https://xkcd.com/2726}
        }
    \end{figure}
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Causal Identification / DGP%%%%%%%%%%%%%%%%%%%%%%%%
\section{Causal Model}
% Data Generating process
% - Agents and their decisions
% - Factors that influence each decision
% - 
% - 
%-------------------------------------------------------------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Data Generating Process}
    % study sponsors
    Study Sponsors Decide to start a Phase 3 trial and whether to terminate it.
    \\
    They ask themselves:
    \begin{itemize}
        \item Do safety incidents require terminating a trial?
        \item Do efficacy results indicate the trial is worth continuing?
        \item Is recruiting sufficient to achieve our results and contain costs?
        \item Do expectations about future returns justify our expenditures?
    \end{itemize}
    
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Data Generating Process}
    % participants
    Participants decide to enroll (and disenroll) themselves in a trial based 
    \begin{itemize}
        \item Disease severity
        \item Relative safety/efficacy compared to other treatments
    \end{itemize}

    Study sponsors plan their enrollment considering
    \begin{itemize}
        \item Total population affected
        \item Likely participant response rates
    \end{itemize}

\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Data Generating Process}
    % Trial Snapshots and dependencies.
    During a trial, the study sponsor reports snapshots of their trial.
    This includes updates to:

    \begin{itemize}
        \item enrollment (actual or anticipated)
        \item current recruitment status (Recruiting, Active not recruiting, etc)
        \item study sponsor
        \item planned completion dates
        \item elapsed duration
    \end{itemize}

    Note that final enrollment and the final status (Completed or Terminated) 
    of the trial are jointly determined.
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Causal Diagram: Key Pathways}
    % Estimating Direct vs Total Effects
    \begin{figure}
        \resizebox{!}{0.5\textheight}{
            \tikzfig{../assets/tikzit/CausalGraph}
        }
        \label{FIG:CausalDiagram}
        \caption{Causal Diagram highlighting direct and total pathways}
    \end{figure}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Causal Diagram: Backdoor Crieterion}
    \small
    \begin{block}{$d$-separation}
        A set $S$ of nodes blocks a path $p$ if either
        \begin{enumerate}
            \item $p$ contains at least one arrow-emitting node in $S$
            \item $p$ contains at least one collision node $c$ that is outside $S$ 
                and has no descendants in $S$.
        \end{enumerate}
        If $S$ blocks all paths from X to Y, then it is said to ``$d$-separate'' 
        $X$ and $Y$, and then $X \perp Y | S$.
    \end{block}
    \begin{block}{Back-Door Criterion}
        A set $S$ of covariates is admisible as controls on the 
        causal relationship $X \rightarrow Y$ if:
        \begin{enumerate}
            \item No element of $S$ is a decendant of $X$
            \item The elements of $S$ d-separate all paths from $X$ to $Y$ that include
                parents of $X$.
        \end{enumerate}
    \end{block}
    \cite{pearl_causality_2000}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Causal Diagram}
    Key takeaways
    \begin{itemize}
        \item Measuring enrollment prior to trial completion is necessary for causal identification.
        \item The backdoor criterion gives us the following adjustment sets:
            \begin{itemize}
                \item Total Effect for Market on Termination; Population, Condition, Phase III
                \item Direct Effects for Enrollment, Market on Termination; Population, Condition Phase III, 
                    Elapsed Duration, Planned Enrollment
            \end{itemize}
        \item Enrollment requires imputation
    \end{itemize}
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Data %%%%%%%%%%%%%%%%%%%%%%%%
\section{Data}
%-------------------------------------------------------------------------------------
%----------------------------------
%%%%%%%%%%%%%%%%%%%% Sources
\subsection{Sources}
%----------------------------------
%-------------------------------
\begin{frame} %Allow frame breaks
    \frametitle{Data Sources}
    \begin{itemize}
        \item ClinicalTrials.gov - AACT \& custom scripts
            \begin{itemize}
                \item Select trials of interest
                \item Trial details: 
                    \begin{itemize}
                        \item conditions
                        \item final status
                        \item drugs/interventions
                    \end{itemize}
                \item Trial snapshots:
                    \begin{itemize}
                        \item enrollment (anticipated, planned, or actual)
                        \item elapsed duration
                        \item current status
                    \end{itemize}
            \end{itemize}
        \item Medical Subject Headings (MeSH) Thesaurus
            \begin{itemize}
                \item A standardized nomenclature used to classify interventions 
                    and conditions in the clinical trials database.
            \end{itemize}
    \end{itemize}
\end{frame}
%-------------------------------
\begin{frame} %Allow frame breaks
    \frametitle{Data Sources}
    \begin{itemize}
        \item NSDE Files (New drug code Structured product labels Data Element)
            \begin{itemize}
                \item Contains information about when a given drug was on the market.
            \end{itemize}
        \item RxNorm
            \begin{itemize}
                \item Links pharmaceuticals between MeSH standardized terms and 
                    NSDE files.
            \end{itemize}
        \item Global Disease Burden Survey (2019)
            \begin{itemize}
                \item Estimates of DALYs for categories of disease
                \item Links of Categories to ICD-10 Codes
            \end{itemize}
        \item ICD-10 (2019)
            \begin{itemize}
                \item WHO version
                \item CMS version (Clinical Managment)
                \item Used to group disease conditions in hierarchal model
            \end{itemize}
        \item Unified Medical Language System Thesaurus
            \begin{itemize}
                \item Used to link MeSH standardized terms and ICD-10 conditions
                \item Manual matching process
            \end{itemize}
    \end{itemize}
\end{frame}
%----------------------------------
%%%%%%%%%%%%%%%%%%%% Integration
\subsection{Integration}
%----------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Data Summaries}
    %put summaries now
    \begin{itemize}
        \item Number of Phase III, FDA monitored Drug Trials: 1,981
        \item Number of Trials matched to ICD-10: 186
        \item Number of Trials matched to ICD-10 with population measures: 67 
            (51 completed, 16 terminated)
        \item Number of Snapshots: 616
    \end{itemize}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Data used}
    The following data points were used.
    \begin{itemize}
        \item elapsed duration 
        \item asinh(number of brands)
        \item asinh(high sdi DALY estimate)
        \item asinh(high-medium sdi DALY estimate)
        \item asinh(medium sdi DALY estimate)
        \item asinh(low-medium sdi DALY estimate)
        \item asinh(low sdi DALY estimate)
    \end{itemize}
    The asinh operator was used because it parallells $\text{ln}(x)$ for 
    large values of $x$ but also handles $\text{asinh}(0)=0$.
\end{frame}
%----------------------------------
\begin{frame}
    \frametitle{Summaries: Trial Durations}
    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/2023-04-12_durations_hist.png}
        \label{FIG:durations}
        \caption{Trial Durations (days)}
    \end{figure}
\end{frame}
%----------------------------------
\begin{frame}
    \frametitle{Summaries: snapshots}
    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/2023-04-12_snapshots_hist.png}
        \label{FIG:snapshots}
        \caption{Number of Snapshots per matched trial}
    \end{figure}
\end{frame}
%----------------------------------
\begin{frame}
    \frametitle{Summaries: snapshots}
    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/2023-04-12_status_duration_snapshots_points.png}
        \label{FIG:snapshot_duration_scatter}
        \caption{Scatterplot of snapshot count and durations}
    \end{figure}
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Econometric Model %%%%%%%%%%%%%%%%%%%%%%%%
\section{Econometric model}
%-------------------------------------------------------------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Econometric Model}
    Estimating the total effect of brands on market
    \begin{align}
        y_n &\sim \text{Bernoulli}(p_n) \\
        p_n &= \text{logisticfn}(x_n * \beta(d_n)) \\
        \beta_k(d) &\sim \text{Normal}(\mu_k, \sigma_k) \\
        \mu_k &\sim \text{Normal}(0,1) \\
        \sigma_k &\sim \text{Gamma}(2,1)
    \end{align}
    $k$ indexes parameters and $d_n$ represets the ICD-10 group the trial corresponds to.
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Results %%%%%%%%%%%%%%%%%%%%%%%%
\section{Results}
%-------------------------------------------------------------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Results}
    Because bayesian estimation is typically done numerically, we will first 
    validate convergence.

    Then we will take a look at preliminary results.

    Sampling details
    \begin{itemize}
        \item 6 chains
        \item 2,500 warmup, 2,500 sampling runs
        \item seed = 11021585
    \end{itemize}
\end{frame}
%----------------------------------
%%%%%%%%%%%%%%%%%%%% Convergence Tests
\subsection{Convergence}
%----------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Warnings}

    \begin{itemize}
        \item There were no diverging transitions.
        \item There were 15,000 transitions that exceeded max treedepth. 
            Sampling efficiency is poor.
        \item All chains had low Bayesian Fraction of Missing Information. 
            Some areas of the distribution were poorly explored.
        \item R-hat = $1.23$, ideal is around 1, chains did not mix well.
        \item Bulk and Tail Effective Sample sizes were low, 
            suggesting mean and variance/quantile estimates will be unreliable.
    \end{itemize}
    \cite{mc-stan}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Convergence: Mu}
    \begin{figure}
        \includegraphics[height=0.9\textheight]{../assets/img/2023-04-11_mu_points.png}
        \label{FIG:caption}
        \caption{Hyperparameter Points Plots: Mu}
    \end{figure}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Convergence: Sigma}
    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/2023-04-11_sigma_points.png}
        \label{FIG:caption}
        \caption{Hyperparameter Points Plots: Sigma}
    \end{figure}
\end{frame}
%----------------------------------
%%%%%%%%%%%%%%%%%%%% Preliminary Results
\subsection{Preliminary Results}
%----------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Preliminary Results: Mu}

    \begin{columns}
        \begin{column}{0.3\textwidth}
            \begin{enumerate}
                \item elapsed duration 
                \item asinh(n\_brands)
                \item asinh(high sdi)
                \item asinh(high-medium sdi)
                \item asinh(medium sdi)
                \item asinh(low-medium sdi)
                \item asinh(low sdi)
            \end{enumerate}
        \end{column}
        \begin{column}{0.7\textwidth}
            \begin{figure}
                \includegraphics[height=0.8\textheight]{../assets/img/2023-04-11_mu_dist.png}
                \label{FIG:caption}
                \caption{Hyperparameter Distribution: Mu}
            \end{figure}
        \end{column}
    \end{columns}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Preliminary Results: Sigma}

    \begin{figure}
        \includegraphics[height=0.8\textheight]{../assets/img/2023-04-11_sigma_dist.png}
        \label{FIG:caption}
        \caption{Hyperparameter Distribution: Sigma}
    \end{figure}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Interpretation}
    All of the following interpretations are done in the context of insufficient data

    \begin{enumerate}
        \item Elapsed Duration (Mu[1]): Trending Negative, reduced probability of termination.
        \item Number of Brands(Mu[2]): Trending Positive, increased probability of termination.
        \item Population Measures (Mu[3]-Mu[7])
            \begin{enumerate}
                \item What is most surprising is that these are both positive and negative.
                    Probably need more data.
            \end{enumerate}
        \item It is surprising to see the wide distribution in sigma values.
    \end{enumerate}
\end{frame}
%-------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%% Improvements %%%%%%%%%%%%%%%%%%%%%%%%
\section{Improvements}
%-------------------------------------------------------------------------------------
%-------------------------------
\begin{frame}
    \frametitle{Proposed improvements}
    \begin{enumerate}
        \item Match more trials to ICD-10 codes
        \item Improve Measures of Market Conditions
        \item Adjust Covariance Structure
        \item Find Reasonable Priors
        \item Remove disease categories that don't exist in the data from the priors
        \item Imputing Enrollment
        \item Improve Population Estimates
    \end{enumerate}
\end{frame}
%-------------------------------
\begin{frame}
    \frametitle{Questions?}
    \center{\huge{Questions?}}

\end{frame}
%-------------------------------
\begin{frame}[allowframebreaks]
    \frametitle{Bibliography}
    \printbibliography
\end{frame}
%-------------------------------
\end{document} 
%=========================================
%\begin{frame}
%    \frametitle{MarginalRevenue}
%    \begin{figure}
%        \tikzfig{../Assets/owned/ch8_MarginalRevenue}
%        \includegraphics[height=\textheight]{../Assets/copyrighted/KrugmanObsterfeldMeliz_fig8-7.jpg}
%        \label{FIG:costs}
%        \caption{Average Cost Curve as firms enter.}
%    \end{figure}
%\end{frame}
%-------------------------------
%\begin{frame}
%    \frametitle{Columns}
%     \begin{columns}
%        \begin{column}{0.5\textwidth}
%        \end{column}
%        \begin{column}{0.5\textwidth}
%               \begin{figure}
%                   \tikzfig{../Assets/owned/ch7_EstablishedAdvantageExample2}
%                   \label{FIG:costs}
%                   \caption{Setting the Stage}
%               \end{figure}
%        \end{column}
%     \end{columns}
%\end{frame}
% %---------------------------------------------------------------
