\chapter{Supplementary material to accompany Chapter 3}
\label{AppendixC}




%\begin{table}[H]
%\centering
%\begin{tabular}{|c|c|c|}
%  \hline\hline
% & cognitive score & fine motor score \\ 
%  \hline\hline
%     \multirow{2}{*}{BL\textsuperscript{1}} & NDE: -0.01 (-0.27, 0.20) & NDE: -0.03 (-0.26, 0.19) \\ 
%   & NIE: ~-0.10 (-0.39, 0.17) & NIE: ~-0.06 (-0.28, 0.20) \\ 
%   \hline
%   \multirow{2}{*}{HC\textsuperscript{1}}& NDE: -0.10 (-0.39, 0.15) & NDE: -0.09 (-0.33, 0.16) \\ 
%   & NIE: ~-0.01 (-0.30, 0.27) & NIE: ~ 0.00 (-0.26, 0.27) \\ 
%   \hline
%    \multirow{2}{*}{BW\textsuperscript{1}}& NDE: -0.10 (-0.40, 0.16) & NDE: -0.09 (-0.32, 0.15) \\ 
%   & NIE: ~-0.01 (-0.31, 0.29) & NIE: ~ 0.00 (-0.25, 0.24) \\ 
%   \hline\hline
%    \multirow{3}{*}{joint\textsuperscript{2}}  & TE:~\hspace*{2mm} -0.11 (-0.40, 0.12) & TE: ~\hspace*{2mm}-0.09 (-0.31, 0.12) \\ 
%   & NDE: -0.05 (-0.30, 0.19) & NDE: -0.06 (-0.28, 0.16) \\ 
%  & NIE: ~-0.06 (-0.34, 0.20) & NIE: ~-0.03 (-0.27, 0.21) \\ 
%  \hline\hline
%    \multirow{3}{*}{global\textsuperscript{3}}  & \multicolumn{2}{c|}{TE: ~\hspace*{2mm}-0.11 (-0.26, 0.04) } \\
% 				       & \multicolumn{2}{c|}{ NDE:  -0.06 (-0.22, 0.10) } \\
%				       & \multicolumn{2}{c|}{NIE: ~-0.05 (-0.22, 0.12)} \\
%	 \hline
%\end{tabular}
%\end{table}




%%%%%%%%% Effects table %%%%%%%%%%%%%
\section{Supplemental tables}
\label{s:P2AppendixTables}

\begin{table}[H]
\centering
\singlespacing
\begin{tabular}{|c|c|c|}
  \hline\hline
& cognitive score & fine motor score \\ 
  \hline\hline
\multirow{3}{*}{BL\textsuperscript{1}}
 & CDE25: 0.78 & CDE25: 0.85 \\ 
 & CDE50: 0.75 & CDE50: 0.79 \\ 
 & CDE75: 0.69 & CDE75: 0.81 \\ 
  \hline
\multirow{3}{*}{HC\textsuperscript{1}}
 & CDE25: 0.64 & CDE25: 0.65 \\ 
 & CDE50: 0.58 & CDE50: 0.7 \\ 
 & CDE75: 0.54 & CDE75: 0.74 \\ 
  \hline
\multirow{3}{*}{BW\textsuperscript{1}} 
 & CDE25: 0.58 & CDE25: 0.72 \\ 
 & CDE50: 0.58 & CDE50: 0.71 \\ 
 & CDE75: 0.56 & CDE75: 0.75 \\ 
  \hline\hline
\multirow{3}{*}{joint\textsuperscript{2}} 
 & CDE25: 0.65 & CDE25: 0.71 \\ 
 & CDE50: 0.71 & CDE50: 0.67 \\ 
 & CDE75: 0.75 & CDE75: 0.65 \\ 
  \hline
  \end{tabular}
  \caption[Efficiency gains of the CDEs at each stage of combining information across the multiple mediator and outcome measurements in a Bangladeshi cohort.]{Efficiency gains of the CDEs at each stage of combining information across the multiple mediator and outcome measurements in a Bangladeshi cohort, when considering a change in the raw exposures from $\ba^*=(As_{.25}=0.56 \mu$g/dL, $Mn_{.25}= 4.72 \mu$g/dL, $Pb_{.25}= 1.15 \mu$g/dL), all metals set at their corresponding 25$^{th}$ percentile, to $\ba=(As_{.75}= 1.58 \mu$g/dL, $Mn_{.75}= 17.80 \mu$g/dL, $Pb_{.75}=2.42 \mu$g/dL), all metals set at their 75$^{th}$ percentile. \textsuperscript{1}Width of the credible interval for a given effect and outcome estimated from the joint mediator model divided by the width of the corresponding credible interval estimated from separate mediator-outcome BKMR--CMA. \textsuperscript{2}Width of the credible interval for the global mediated effect, combining information from all mediator and outcome measurements, divided by the width of the credible interval for the corresponding effect estimated from a joint mediator, but separate outcome, model. We calculated these ratios using credible intervals constructed with the appropriate Bonferroni correction for multiple comparisons. CDE25 represents the CDE when the mediator(s) are set to their 25$^{th}$ percentile(s), CDE50 represents the CDE when the mediator(s) are set to their 50$^{th}$ percentile(s), and CDE75 represents the CDE when the mediator(s) are set to their 75$^{th}$ percentile(s).}
  \label{P3:CDEeffgain}
\end{table}





%%%%%%%%% Effects table %%%%%%%%%%%%%

\vspace*{-2.2cm}
\begin{table}[H]
\centering
\singlespacing
\begin{tabular}{|c|c|c|}
  \hline\hline
 & cognitive score & fine motor score \\ 
  \hline\hline
    \multirow{5}{*}{BL\textsuperscript{1}} & NDE: ~~~-0.01 (-0.27, 0.20) & NDE: ~~~-0.03 (-0.26, 0.19) \\ 
  & NIE: ~~~~-0.10 (-0.39, 0.17) & NIE: ~~~~-0.06 (-0.28, 0.20) \\ 
  & CDE25: -0.02 (-0.28, 0.14) & CDE25: -0.02 (-0.23, 0.13) \\ 
  & CDE50: -0.01 (-0.25, 0.14) & CDE50: -0.02 (-0.26, 0.13) \\ 
  & CDE75: \hspace*{1mm}0.00 (-0.22, 0.17) & CDE75: -0.03 (-0.27, 0.12) \\ 
  \hline
    \multirow{5}{*}{HC\textsuperscript{1}} & NDE:~~~ -0.10 (-0.39, 0.15) & NDE: ~~~-0.09 (-0.33, 0.16) \\ 
  & NIE: ~~~~-0.01 (-0.30, 0.27) & NIE:~~~~ \hspace*{1mm}0.00 (-0.26, 0.27) \\ 
  & CDE25: -0.10 (-0.40, 0.12) & CDE25: -0.08 (-0.32, 0.15) \\ 
  & CDE50: -0.11 (-0.40, 0.11) & CDE50: -0.09 (-0.33, 0.10) \\ 
  & CDE75: -0.11 (-0.40, 0.11) & CDE75: -0.09 (-0.33, 0.10) \\ 
  \hline
  \multirow{5}{*}{BL\textsuperscript{1}} & NDE:~~~ -0.10 (-0.40, 0.16) & NDE: ~~~-0.09 (-0.32, 0.15) \\ 
  & NIE: ~~~~-0.01 (-0.31, 0.29) & NIE: ~~~~\hspace*{1mm}0.00 (-0.25, 0.24) \\ 
  & CDE25: -0.11 (-0.47, 0.11) & CDE25: -0.09 (-0.32, 0.11) \\ 
  & CDE50: -0.10 (-0.40, 0.11) & CDE50: -0.09 (-0.31, 0.11) \\ 
  & CDE75: -0.09 (-0.37, 0.12) & CDE75: -0.08 (-0.31, 0.11) \\ 
  \hline\hline
  \multirow{6}{*}{joint\textsuperscript{2}} & TE: ~~~~~-0.11 (-0.40, 0.12) & TE:~~~~~ -0.09 (-0.31, 0.12) \\ 
  & NDE: ~~~-0.05 (-0.30, 0.19) & NDE: ~~~-0.06 (-0.28, 0.16) \\ 
  & NIE:~~~~ -0.06 (-0.34, 0.20) & NIE:~~~~ -0.03 (-0.27, 0.21) \\ 
  & CDE25: -0.01 (-0.25, 0.15) & CDE25: -0.02 (-0.24, 0.17) \\ 
  & CDE50: -0.01 (-0.22, 0.15) & CDE50: -0.03 (-0.25, 0.13) \\ 
  & CDE75: \hspace*{1mm}0.00 (-0.20, 0.16) & CDE75: -0.03 (-0.27, 0.11) \\ 
 \hline\hline
        \multirow{3}{*}{global\textsuperscript{3}}  & \multicolumn{2}{|c|}{TE: ~\hspace*{2mm}~~\hspace*{2mm}-0.11 (-0.26, 0.04) } \\
 				       & \multicolumn{2}{c|}{ NDE: ~~\hspace*{1mm} -0.06 (-0.22, 0.10) } \\
				       & \multicolumn{2}{c|}{NIE: ~~~~\hspace*{1mm}-0.05 (-0.22, 0.12)} \\
				       & \multicolumn{2}{c|}{CDE25: -0.01 (-0.15, 0.07)} \\
				       & \multicolumn{2}{c|}{CDE50: -0.01 (-0.15, 0.06)} \\
				       & \multicolumn{2}{c|}{CDE75: -0.01 (-0.15, 0.06)} \\
   \hline
\end{tabular}
\caption[Estimated mediation effects in a Bangladeshi cohort for a change in the exposures from all metals set at their 25$^{th}$ percentile all metals set at their 75$^{th}$ percentile]{Estimated mediation effects in a Bangladeshi cohort for a change in the raw exposures from $\ba^*=(As_{.25}=0.56 \mu$g/dL, $Mn_{.25}= 4.72 \mu$g/dL, $Pb_{.25}= 1.15 \mu$g/dL), all metals set at their corresponding 25$^{th}$ percentile, to $\ba=(As_{.75}= 1.58 \mu$g/dL, $Mn_{.75}= 17.80 \mu$g/dL, $Pb_{.75}=2.42 \mu$g/dL), all metals set at their 75$^{th}$ percentile.  \textsuperscript{1}Estimates from separate mediator-outcome BKMR--CMA with a Bonferroni correction for six analyses, \textsuperscript{2}effect estimates after combining information across the three fetal growth measurements with a Bonferroni correction for two analyses, and \textsuperscript{3}global mediated effects pooling information from all mediator and outcome measurements. CDE25 represents the CDE when the mediator(s) are set to their 25$^{th}$ percentile(s), CDE50 represents the CDE when the mediator(s) are set to their 50$^{th}$ percentile(s), and CDE75 represents the CDE when the mediator(s) are set to their 75$^{th}$ percentile(s). } 
\label{P3:effectstable}
\end{table}






\newpage
%%%%%%%%% CDE with BKMR %%%%%%%%%%%%%
\section{Algorithm to estimate global CDEs using BKMR:}
\label{P3:CDEalgorithm}

\begin{enumerate}
	\item Fit BKMR outcome model (\ref{jointoutmodel}).		
			
	\item For each MCMC iteration, $j=1,\hdots, J $:
			
	\begin{enumerate}
\item Estimate the average outcome value for the reference group ($s=1$), the mean level of covariates, the specific mediator vector of interest $\bm$, and $\ba_{\text{new}}=\begin{pmatrix} \ba & \ba^* \end{pmatrix}\trans$ from (\ref{jointoutmodel}). (I.e. estimate $Y_{\ba^*\bm}$ and $Y_{\ba \bm}$ for each MCMC iteration).
	\begin{eqnarray*}
		\bY_{\ba_{\text{new}} \bm}^{(j)}(\cbar) &=& \E^{(j)}(Y_{s=1} | \bA = \ba_{\text{new}}, \bM= \bm, \bC=\cbar)\\
		& =& \theta_{s=1}^{(j)} + h_Y^{(j)}(\bA=\ba_{\text{new}},\bM=\bm) + \cbar^T\btheta^{(j)}
	\end{eqnarray*}
								
	\item Obtain the $j^{th}$ posterior sample of the global CDE for a change of exposure from $\ba^*$ to $\ba$ intervening to fix the mediator measurements at $\bm$ by:							\begin{eqnarray*}
				CDE_{\text{global}}^{(j)} &=&  Y_{\ba \bm}^{(j)}(\cbar)- Y_{\ba^*\bm}^{(j)}(\cbar).
\end{eqnarray*}	
		\end{enumerate}
			
	\item Estimate the global CDE and 95\% credible intervals from these posterior samples.
\end{enumerate}
\noindent Only two no unmeasured confounding assumptions are required for the global CDE to have a causal interpretation: $\bY_{\ba \bm} \amalg \bA | \bC$, $\bY_{\ba \bm} \amalg \bM | \bC, \bA$. Namely, there are no unmeasured exposure-outcome confounders and there are no unmeasured mediator-outcome confounders. \\




