got a reasonable draft

claude_rewrite
Will King 2 years ago
parent b31544366b
commit b38119e0a8

@ -52,10 +52,10 @@
\subfile{sections/10_CausalStory} \subfile{sections/10_CausalStory}
\subfile{sections/02_data} \subfile{sections/02_data}
%--------------------------------------------------------------- % %---------------------------------------------------------------
\section{Causal Identification}\label{SEC:CausalIdentification} % \section{Causal Identification}\label{SEC:CausalIdentification}
%--------------------------------------------------------------- % %---------------------------------------------------------------
\subfile{sections/03_CausalIdentification} % \subfile{sections/03_CausalIdentification}
%--------------------------------------------------------------- %---------------------------------------------------------------
\section{Econometric Model}\label{SEC:EconometricModel} \section{Econometric Model}\label{SEC:EconometricModel}

@ -62,7 +62,7 @@ investment directly, causing a trial to terminate early if the return is
not high enough. not high enough.
\begin{figure}[H] %use [H] to fix the figure here. \begin{figure}[H] %use [H] to fix the figure here.
\includegraphics[width=\textwidth]{../assets/img/dagitty-model.jpg} \scalebox{0.6}{\tikzfig{../assets/tikzit/CausalGraph2}}
\caption{Causal Model} \caption{Causal Model}
\label{Fig:CausalModel} \label{Fig:CausalModel}
\end{figure} \end{figure}

@ -47,8 +47,8 @@ The betas are distributed
\end{align} \end{align}
With hyperparameters With hyperparameters
\begin{align} \begin{align}
\mu_k \sim \text{Normal}(0,1) \\ \mu_k \sim \text{Normal}(0,0.05) \\
\sigma_k \sim \text{Gamma}(2,1) \sigma_k \sim \text{Gamma}(4,20)
\end{align} \end{align}

@ -19,97 +19,101 @@ written or requires reparameterization.
%TODO: and info about how I learned about these diagnostics %TODO: and info about how I learned about these diagnostics
\subsubsection{Diagnostics} % \subsubsection{Diagnostics}
%Examine trank plots % %Examine trank plots
To identify which parameters were problematic, I first looked at trace rank % To identify which parameters were problematic, I first looked at trace rank
histograms. % histograms.
Under idea circumstances, each line (representing a chain) should exchange % Under idea circumstances, each line (representing a chain) should exchange
places with the other lines frequently. % places with the other lines frequently.
In both \cref{fig:mu_trank} and \cref{fig:sigma_trank}, most parameters seem % In both \cref{fig:mu_trank} and \cref{fig:sigma_trank}, most parameters seem
to mix well but there are a couple of exceptions. % to mix well but there are a couple of exceptions.
This warrants further investigation. % This warrants further investigation.
%
% \begin{figure}[H]
% \includegraphics[width=\textwidth]{../assets/img/mu_trank.png}
% \caption{Trace Rank Histogram: Mu values}
% \label{fig:mu_trank}
% \end{figure}
%
% \begin{figure}[H]
% \includegraphics[width=\textwidth]{../assets/img/sigma_trank.png}
% \caption{Trace Rank Histogram: Sigma values}
% \label{fig:sigma_trank}
% \end{figure}
%
% %Take a look at batman and points for mu
% In the case of the Mu values, a parallel coordinates plot
% doesn't seem to indicate any parameters as likely candidates
% for causing the issues with divergent transitions.
% \begin{figure}[H]
% \includegraphics[width=\textwidth]{../assets/img/mu_batman.png}
% \caption{Parallel Coordinate Plot: Mu values}
% \label{fig:mu_batman}
% \end{figure}
% Note that at each parameter, there is some level of dispersion between
% values that diverged.
%
% On the other hand, in the parallel coordinates plot for sigma values,
% it appears that most divergent transitions occur with values of
% sigma[1], sigma[3], sigma[6], and sigma[7] close to zero.
% \begin{figure}[H]
% \includegraphics[width=\textwidth]{../assets/img/sigma_batman.png}
% \caption{Parallel Coordinate Plot: Sigma values}
% \label{fig:sigma_batman}
% \end{figure}
% Overall this suggests that there is an issue with the specification
% of the covariance structures of the hyperparameters.
%
% Additional evidence that the covariance structure is incorrect comes from
% plotting pairs of parameter values and examining the chains with divergent
% transitions.
%
% \begin{figure}[H]
% \includegraphics[width=\textwidth]{../assets/img/sigma_pairs_5-9.png}
% \caption{Parameter Pairs plots: Sigma[5] through Sigma[9]}
% \label{fig:sigma_pairs_5-9.png}
% \end{figure}
% From this we can see that divergent pairs are highly correlated with the cases
% where sigma[6] or sigma[7] are equal to zero.
% This has an impact on the shape of both of those estimated parameters, causing
% both to be bimodal.
\begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/mu_trank.png}
\caption{Trace Rank Histogram: Mu values}
\label{fig:mu_trank}
\end{figure}
\begin{figure}[H] \subsection{Interpretation}
\includegraphics[width=\textwidth]{../assets/img/sigma_trank.png}
\caption{Trace Rank Histogram: Sigma values}
\label{fig:sigma_trank}
\end{figure}
%Take a look at batman and points for mu The key results so far are related to the distribution of differences in $p$.
In the case of the Mu values, a parallel coordinates plot
doesn't seem to indicate any parameters as likely candidates In figure \ref{fig:pred_dist_dif_delay} we see that there while most trials do not see any increased risk
for causing the issues with divergent transitions. from a delay in closing enrollment, there is a small group that does experience this.
\begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/mu_batman.png}
\caption{Parallel Coordinate Plot: Mu values}
\label{fig:mu_batman}
\end{figure}
Note that at each parameter, there is some level of dispersion between
values that diverged.
On the other hand, in the parallel coordinates plot for sigma values,
it appears that most divergent transitions occur with values of
sigma[1], sigma[3], sigma[6], and sigma[7] close to zero.
\begin{figure}[H] \begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/sigma_batman.png} \includegraphics[width=\textwidth]{../assets/img/current/pred_dist_diff-delay}
\caption{Parallel Coordinate Plot: Sigma values} \caption{}
\label{fig:sigma_batman} \label{fig:pred_dist_diff_delay}
\end{figure} \end{figure}
Overall this suggests that there is an issue with the specification
of the covariance structures of the hyperparameters.
Additional evidence that the covariance structure is incorrect comes from
plotting pairs of parameter values and examining the chains with divergent
transitions.
Figure \ref{fig:pred_dist_dif_delay2} shows how this varies across disease categories
\begin{figure}[H] \begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/sigma_pairs_5-9.png} \includegraphics[width=\textwidth]{../assets/img/current/pred_dist_diff-delay-group}
\caption{Parameter Pairs plots: Sigma[5] through Sigma[9]} \caption{}
\label{fig:sigma_pairs_5-9.png} \label{fig:pred_dist_dif_delay2}
\end{figure} \end{figure}
From this we can see that divergent pairs are highly correlated with the cases
where sigma[6] or sigma[7] are equal to zero.
This has an impact on the shape of both of those estimated parameters, causing
both to be bimodal.
\subsection{Interpretation}
Ignoring the diagnosed issues with the model, we do see some interesting
preliminary results.
%in mu, mu[5] shifted strongly
In \cref{fig:mu_posterior} we see that mu[5], the parameter corresponding
to enrollment appears to be strongly negative.
This is consistent with the idea that enrollment close to planned enrollment
decreases the probability of terminating the trial.
In \cref{fig:sigma_posterior}, sigma[2] (corresponding to the number of brands
selling the drug of interest) has a large variance covers some relatively
high values.
This suggests that the impact of how frequently the drug is sold varies greatly
across different ICD-10 categories of disease.
We can also examine the direct effect from adding a single generic competitior drug.
\begin{figure}[H] \begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/mu_posterior.png} \includegraphics[width=\textwidth]{../assets/img/current/pred_dist_diff-generic}
\caption{Posterior Parameter Estimates: Mu} \caption{}
\label{fig:mu_posterior} \label{fig:pred_dist_diff_generic}
\end{figure} \end{figure}
% Sigma[2] suggests there is a high variance in the impact that the number of drugs on the market has. Figure \ref{fig:pred_dist_dif_generic2} shows how this varies across disease categories
\begin{figure}[H] \begin{figure}[H]
\includegraphics[width=\textwidth]{../assets/img/sigma_posterior.png} \includegraphics[width=\textwidth]{../assets/img/current/pred_dist_diff-generic-group}
\caption{Posterior Hyperparameter Estimates: Sigma} \caption{}
\label{fig:sigma_posterior} \label{fig:pred_dist_dif_generic2}
\end{figure} \end{figure}
Due to the deficiencies in the data and model, this is the limit of the
analysis I will perform at this time.
\end{document} \end{document}

@ -62,7 +62,7 @@ investment directly, causing a trial to terminate early if the return is
not high enough. not high enough.
\begin{figure}[H] %use [H] to fix the figure here. \begin{figure}[H] %use [H] to fix the figure here.
\includegraphics[width=\textwidth]{../assets/img/dagitty-model.jpg} \scalebox{0.6}{\tikzfig{../assets/tikzit/CausalGraph2}}
\caption{Causal Model} \caption{Causal Model}
\label{Fig:CausalModel} \label{Fig:CausalModel}
\end{figure} \end{figure}

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@ -0,0 +1,37 @@
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Red Box] (0) at (4, -1.5) {Will Terminate?};
\node [style=Red Box] (1) at (-4.25, -1.5) {Market Measures};
\node [style=Red Box] (5) at (-0.25, 2) {Enrollment Status};
\node [style=emptyBox] (9) at (12.25, 6.25) {Fundamental Efficacy/Safety};
\node [style=emptyBox] (10) at (-0.25, 8) {Previously Observed Efficacy/Safety};
\node [style=emptyBox] (12) at (14, 0.25) {Currently Observed Efficacy/Safety};
\node [style=Gray Box] (18) at (-6.5, 1.5) {Population};
\node [style=Gray Box] (20) at (-0.25, 5) {Decision to procced with Phase III};
\node [style=Gray Box] (21) at (0, -3.5) {Condition};
\node [style=Gray Box] (22) at (7.25, 2.75) {Elapsed Duration};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=RightArrow] (18) to (5);
\draw [style=RightArrow] (18) to (1);
\draw [style=RightArrow] (9) to (10);
\draw [style=RightArrow] (10) to (20);
\draw [style=RightArrow] (9) to (12);
\draw [style=RightArrow] (12) to (0);
\draw [style=Light Arrow] (21) to (1);
\draw [style=Light Arrow] (21) to (0);
\draw [style=Light Arrow, in=-120, out=165, looseness=2.00] (21) to (18);
\draw [style=Light Arrow, in=180, out=180, looseness=2.75] (21) to (20);
\draw [style=Light Arrow, bend right=60, looseness=1.75] (21) to (9);
\draw [style=Light Arrow] (21) to (5);
\draw [style=RightArrow, in=-180, out=165, looseness=2.00] (1) to (20);
\draw [style=RightArrow] (20) to (5);
\draw [style=RightArrow] (22) to (0);
\draw [style=RightArrow, bend left] (20) to (0);
\draw [style=PurpleArrow] (1) to (0);
\draw [style=PurpleArrow] (1) to (5);
\draw [style=PurpleArrow] (5) to (0);
\draw [style=lightredarrow] (22) to (5);
\draw [style=lightredarrow] (5) to (22);
\end{pgfonlayer}
\end{tikzpicture}
Loading…
Cancel
Save