\documentclass[AMA,STIX1COL]{WileyNJD-v2}

\articletype{Web Appendix}%

\received{xxxx}
\revised{xxxx}
\accepted{xxxx}

\raggedbottom

% Packages
%\usepackage{amsmath,amssymb,graphicx}
%\usepackage{graphicx}
%\usepackage{bbm}
%\usepackage{booktabs}
%\usepackage{subfigure}
%\usepackage[format=hang,labelfont=bf]{caption}
%\usepackage[compact]{titlesec}
%\usepackage{bm}
%\usepackage{multirow}
\usepackage{rotating}
%\usepackage{adjustbox}
%\usepackage{url}
%\usepackage{hyperref}
%\usepackage{hhline}
%\usepackage{comment}
\usepackage{cases}
\usepackage{threeparttable}
\usepackage{comment}
\usepackage{listings}
\usepackage{xr}
\usepackage{pdfpages}


\makeatletter
\newcommand*{\addFileDependency}[1]{% argument=file name and extension
  \typeout{(#1)}
  \@addtofilelist{#1}
  \IfFileExists{#1}{}{\typeout{No file #1.}}
}
\makeatother

\newcommand*{\myexternaldocument}[1]{%
    \externaldocument{#1}%
    \addFileDependency{#1.tex}%
    \addFileDependency{#1.aux}%
}



\renewcommand{\figurename}{Web Figure}
\setcounter{figure}{0}
\renewcommand{\tablename}{Web Table}
\setcounter{table}{0}

\newcommand{\be}{\begin{eqnarray}}
\newcommand{\ee}{\end{eqnarray}}
\newcommand{\bee}{\begin{eqnarray*}}
\newcommand{\eee}{\end{eqnarray*}}
\newcommand{\bi}{\begin{enumerate}}
\newcommand{\ei}{\end{enumerate}}


\newcommand{\noteG}[1]{{\footnote{\color{blue} {\bf GP:} #1} }}
\newcommand{\noteL}[1]{{\footnote{\color{blue} {\bf LT:} #1} }}
\newcommand{\noteLF}[1]{{\footnote{\color{red} {\bf FL:} #1} }}
\newcommand{\noteY}[1]{{\footnote{\color{blue} {\bf SY:} #1} }}

\usepackage[noabbrev,capitalize]{cleveref}
\crefformat{equation}{(#2#1#3)}
\renewcommand{\comment}[1]{{\bf [[#1]]}}

\DeclareMathOperator\bE{\mathbb E} % expectation
\DeclareMathOperator\bV{\mathbb V} % variance


\newcommand{\bX}{\mathbf{X}}
\newcommand{\bZ}{\mathbf{Z}}
\newcommand{\ybar}{\bar{y}}
\newcommand{\var}{\textrm{Var}}

\theoremstyle{}
\newtheorem{prop}{Proposition}


\usepackage{xargs, xstring}
\newcommand{\E}{\mathbb{E}}


\begin{document}

\begin{center}
{\bf \LARGE Web Appendix for `Propensity Score Weighting for Subgroup Analysis" by Yang et al.}\\
\vspace{0.5cm}



\end{center}
\section{Proofs}
\subsection{Proofs of Properties of Overlap Weights in Subgroups}
We assume regularity conditions on $v_z=V[Y(z) | X,S]$ and $E[Y(z) |X,S]$ necessary to make the integrals defined and convergent.

(1) $\widehat \tau_{r,h}$ is consistent for $\tau_{r,h}$.
\begin{proof}
The S-WATE for the population with density proportional to $f(x,  s)h(x,  s)$ with respect to base measure $\mu$ is defined as
\begin{align}
\tau_{r,h} &= \frac{\E[h(x,  s)(Y(1) - Y(0)) | S_{r} = 1]}{\E[h(x,s) |S_{r} = 1]}\nonumber\\
&=\frac{\int \bE_{Y,Z|X,S} \left\{Y(1) Z S_{r}[h( x,s)/e(x,s)]  - Y(0) (1-Z)S_{r}[h( x,s)/(1-e(x,s))]\right\} f(x,s) \mu(dx,s)}{\int h(x,s) f(x,s) \mu(dx,s)} \nonumber\\
&= \frac{\int \bE_{Y,Z|X,S} Y(1) ZS_{r}[h(x,s)/e(x,s)] f(x,s)\mu(dx,s)}{\int \bE_{Z|X,S} ZS_{r}[h(x,s)/e(x,s)]f(x,s) \mu(dx,s)}\nonumber\\
&\hspace{40pt}- \frac{\int \bE_{Y,Z|X,S} Y_0 (1-Z)S_{r}[h(x,s)/e(x,s)]f(x,s)\mu(dx,s)}{\int \bE_{Z|X,S} (1-Z)S_{r}[h(x,s)/e(x,s)]f(x,s) \mu(dx,s)} \label{eq:taur}
\end{align}

Under the unconfoundedness assumption that $Y(1),Y(0)\perp Z\mid X,S$.  The terms of \eqref{eq:taur} can be read as expectations of weighted means of $Y(z)$ in samples drawn from the population with density $f(x,s)$ respectively for the strata with $z=1$ or $z=0$, given $S_r=1$.  Replacing expectations by sample means, and substituting weight expressions from \eqref{weight}, we obtain the following estimator for the sample S-WATE:
\begin{equation}
\label{eq:sample}
\hat{\tau}_{r,h}=\frac{\sum_i Y_i(1)Z_iS_{ir}w_1(x_i,s_i)}{\sum_i Z_iS_{ir} w_1(x_i,s_i)}-
\frac{\sum_i Y_i(0)(1-Z_i)S_{ir}w_0(x_i,s_i)}{\sum_i (1-Z_i)S_{ir}w_0(x_i,s_i)}
\end{equation}
where each summation (divided by $n$) is an unbiased estimator of the corresponding integral in \eqref{eq:taur}; therefore by Slutsky's theorem $\hat{\tau}_{r,h}$ is a consistent estimator of $\tau_{r,h}$.
\end{proof}

(2) $h(\bm{X}_i, \bm{S}_i) = e(\bm{X}_i, \bm{S}_i) \{1- e(\bm{X}_i, \bm{S}_i)\}$ gives the smallest variance of the weighted estimator $\widehat \tau_{r,h}$ over all possible $h$ under homoscedasticity.
\begin{proof}
The variance of the estimator $\hat{\tau}_{r,h}$ is
\begin{align}
\bV[\hat{\tau}_{r,h}\mid \bX,\bm{S}, z] &=\frac{\sum_i S_1(x_i,s_i)z_i S_{ir} w_1(x_i,s_i)^2}{\left[\sum_i z_i S_{ir} w_1(x_i,s_i)\right]^2}+
\frac{\sum_i v_0(x_i,s_i)(1-z_i) S_{ir} w_0(x_i,s_i)^2}{\left[\sum_i (1-z_i)S_{ir} w_0(x_i,s_i)\right]^2} \nonumber \\
&= \frac{\sum_i S_1(x_i,s_i)[z_i S_{ir}/e(x_i,s_i)][h(x_i,s_i)^2/e(x_i,s_i)]}{\left\{\sum_i [z_i S_{ir}/e(x_i,s_i)]h(x_i,s_i)\right\}^2}+\nonumber\\
& \hspace{40pt}\frac{\sum_i v_0(x_i,s_i)[(1-z_i)S_{ir}/(1-e(x_i,s_i))][h(x_i,s_i)^2/(1-e(x_i,s_i))]}{\left\{\sum_i [(1-z_i)S_{ir}/(1-e(x_i,s_i))]h(x_i,s_i)\right\}^2}, \end{align}
where $v_z=\bV[Y(z) | X,S]$. Averaging the above first over the distribution of $\bZ$ (using \\$\bE [Z_iS_{ir}/e(x_i,s_i)]=\bE [(1-Z_i)S_{ir}(1-e(x_i,s_i))]=1$), and then over the joint distribution of ($\bX,\bm{S}$), and again applying Slutsky's theorem, we have
\begin{equation*}
n\cdot\bE_x\bV[\hat{\tau}_{r,h}\mid \bX,\bm{S}] \rightarrow \frac{ \int \left(\frac{S_1(x,s)}{e(x,s)}+\frac{v_0(x,s)}{1-e(x,s)}\right)h(x,s)^2 f(x,s)
 \mu(dx,s)}{\left(\int f(x,s)h(x,s)\mu(dx,s)\right)^2}
\end{equation*}
If the residual variance is assumed to be
homoscedastic across both groups, $v_1(x,s) = v_0(x,s) = v$, the above equation simplifies to \begin{equation}\label{simplevar}
n\cdot\bE_x\bV[\hat{\tau}_{r,h}\mid\bX,\bm{S}] \rightarrow v/C_h^2 \int \frac{f(x,s)h(x,s)^2\mu(dx,s)}{e(x,s)(1-e(x,s))}=v/C_h^2\bE\left\{\frac{h^2(x,s)}{e(x,s)(1-e(x,s))}\right\}.
\end{equation}
According to the Cauchy-Schwarz inequality, we have
\begin{eqnarray*}
\left[  \bE\left\{ h(x,s)\right\}\right]^2 &=&  \left[  \bE\left\{\frac{h(x,s)}{\sqrt{e(x,s)(1-e(x,s))}} \sqrt{ e(x,s)(1-e(x,s))}\right\}\right]^2 \\
 &\leq & \bE\left\{\frac{h^2(x,s)}{e(x,s)(1-e(x,s))}\right\} \bE\left[e(x,s)(1-e(x,s))\right],
\end{eqnarray*}
and the equality is attained when $h(x,s)\propto e(x,s)(1-e(x,s))$. Property (2) follows directly from applying the above to the right hand side of \eqref{simplevar}.
\end{proof}
%%%%%%%%%%%%%%%%%%%%%%   prop 1   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Proof of Proposition 1}
\begin{proof}
The data generating law is based on $f(x)$ and the bias property should always be stated with respect to $\E(\cdot)$. Suppose Condition (3) in Proposition 1 holds. For any weight $w_{i}$ (including $\widehat w_i^*$), we have
\begin{align*}
\left| \E\left(\widehat\tau_{r,h} - \tau_r \right) \right| & =
\left| \E \left[ \sum_{i = 1}^N Z_i S_{ir} w_i Y_i - \sum_{i = 1}^N (1 - Z_i)S_{ir} w_i Y_i \right] - \tau_r \right| \\
& = \left| \beta_r \left[ \sum_{i = 1}^N Z_i S_{ir} w_i - \sum_{i = 1}^N (1 - Z_i)S_{ir} w_i \right] \right. + \\
& \hspace{40pt} \left. \sum_{p = 1}^P \beta_{rp} \left[ \sum_{i = 1}^N Z_i S_{ir} w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)S_{ir} w_i X_{ip} \right] +
\tau_r \left[ \sum_{i = 1}^N Z_i S_{ir} w_i - 1 \right] \right| \\
& = \left| \sum_{p = 1}^P \beta_{rp} \left[ \sum_{i = 1}^N Z_i S_{ir} w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)S_{ir} w_i X_{ip} \right] \right| \tag{Normalized weights that sum to 1 among the treated in the subgroup.} \\
& \leq \sum_{p = 1}^P |\beta_{rp}| \left| \sum_{i = 1}^N Z_i S_{ir} w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)S_{ir} w_i X_{ip} \right| \tag{Triangular inequality.} \\
&< \delta \sum_{p = 1}^P | \beta_{rp}|.
\end{align*}
\end{proof}



%%%%%%%%%%%%%%%%%%%%%%   prop 2   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Proof of Proposition 2}
\begin{proof}
The treatment effect is heterogeneous within subgroups and the subgroup average treatment effect is 
%$\tau_{r,h}=\tau_r+\sum_{p = 1}^P \gamma_{rp} \frac{\sum_i h(\bm X_i, \bm S_i)X_{ip} S_{ir} }{\sum_i h(\bm X_i, \bm S_i)S_{ir}}.$
%$$\tau_{r,h}=\tau_r+\sum_{p = 1}^P \gamma_{rp}\frac{\E\{h(\bm{X},\bm{S})X_p|S_{r}=1\}}{\E\{h(\bm{X},\bm{S})|S_{r}=1\}}.$$
$$
\tau_{r,h}=\tau_r+\sum_{p = 1}^P \gamma_{rp}\frac{\E[h(X,S)X_p|S_r=1]}{\E[h(X,S)|S_r=1]}.
$$

Suppose Condition (3) in Proposition 1 and Condition (4) in Proposition 2 hold, similar to the proof of Proposition 1, for any weight $w_i$ (including $\widehat w_i^*$),
\begin{align}
\left| \E\left(\widehat{\tau}_{r,h} - \tau_{r,h} \right) \right| & =
\left| \E \left[ \sum_{i = 1}^N Z_i S_{ir}   w_i Y_i - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i Y_i \right] - \tau_{r,h} \right| \nonumber \\
& = \left| \beta_r  \left[ \sum_{i = 1}^N Z_i S_{ir}   w_i - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i \right] \right. + \label{eq: 5}\\
& \hspace{40pt} \sum_{p = 1}^P \beta_{rp} \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i X_{ip} \right] + \label{eq: 6}\\
&\hspace{40pt} \tau_r \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i - 1 \right] + \label{eq: 7}\\
& \hspace{40pt} \sum_{p = 1}^P \gamma_{rp} \left[\sum_{i = 1}^N Z_i S_{ir}  w_i X_{ip} - \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir} X_{ip}}{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}} \right] + \label{eq: 8}\\
& \hspace{40pt} \left. \sum_{p = 1}^P \gamma_{rp} \left[\frac{\sum_{i=1}^N h(X_i, S_i)S_{ir}X_{ip}}{\sum_{i=1}^N h(X_i,S_i)S_{ir}}-\frac{\E[h(X,S)X_p|S_r=1]}{\E[h(X,S)|S_r=1]}\right] \right| \label{eq: 9},
%\frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir} X_{ip}}{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}}  -\frac{\E[h(\bm{X},\bm{S})X_p|S_{r}=1]}{\E[h(\bm{X},\bm{S})|S_{r}=1]}
\end{align}
where equation \eqref{eq: 5} = 0 by the definition of weights, equation \eqref{eq: 7} = 0  by design of weights, and the expectation of equation \eqref{eq: 9} = 0.


% &= \sum_{i = 1}^N   X_{ip}\left(\frac{Z_i  h(\bm{X}_i)}{e_i(x)}- \frac{h_i(\bm{X}_i)}{\sum_{i = 1}^N  h(\bm{X}_i) }  \right)\\
%&= \sum_{i = 1}^N   X_{ip}h_i(\bm{X}_i)\left(\frac{Z_i}{e_i(x)}- \frac{1}{\sum_{i = 1}^N  h(\bm{X}_i) } \right)
It follows
\begin{align*}
 \left|\E\left(\widehat{\tau}_{r,h} - \tau_{r,h} \right) \right| &=%\left| \sum_{p = 1}^P \beta_{p} \left[ \sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)  w_i X_{ip} \right]+ \sum_{p = 1}^P \gamma_{p} \left[\sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N  h^*(\bm{X}_i)  X_{ip} \right] \right|\\
 (\ref{eq: 6})+(\ref{eq: 8})
 \le \delta \sum_{p = 1}^P|\beta_{rp}|+\delta_{2} \sum_{p = 1}^P |\gamma_{rp}|.
\end{align*}
\end{proof}
 %%%%%%%%%%%%%%%%%%%%%%   prop 2b   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Proof of Proposition 2b}
 
\begin{proof}
 If the causal estimand in Proposition 2 is the subgroup sample weighted average treatment effect (S-SWATE), 
 $$\tau_{r,\widehat h} =\dfrac{\sum_i  \widehat h(\bm{X}_i, \bm{S}_i)S_{ir}[Y_i(1)-Y_i(0)]}{\sum_i  \widehat h(\bm{X}_i, \bm{S}_i)S_{ir} },$$
then %the equation (\ref{eq: 9}) in proof of Proposition \ref{prop:balance_hte} would disappear, and
\eqref{eq: 8} becomes
 \begin{align}
  \sum_{p = 1}^P \gamma_{rp} \left[\sum_{i = 1}^N Z_i S_{ir}  w_i X_{ip} - \frac{\sum_{i = 1}^N  \widehat h(\bm{X}_i, \bm{S}_i) S_{ir} X_{ip}}{\sum_{i = 1}^N  \widehat h(\bm{X}_i, \bm{S}_i) S_{ir}} \right]
 \label{eq: 8b}
 \end{align}

 It follows
\begin{align*}
 \left|\E\left(\widehat{\tau}_{r,\widehat h} - \tau_{r,\widehat h} \right) \right| &=%\left| \sum_{p = 1}^P \beta_{p} \left[ \sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)  w_i X_{ip} \right]+ \sum_{p = 1}^P \gamma_{p} \left[\sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N  h^*(\bm{X}_i)  X_{ip} \right] \right|\\
 \eqref{eq: 6}+\eqref{eq: 8b}
 \le \delta \sum_{p = 1}^P|\beta_{rp}|+\delta_{3} \sum_{p = 1}^P |\gamma_{rp}|.
\end{align*}
The quantity in \eqref{eq: 8b} can be calculated. Note for the class of balancing weights, frequently the weights are estimated from the propensity score model, therefore
\begin{align*}
 \sum_{i = 1}^N Z_i S_{ir} \widehat{w}_i X_{ip} -\frac{\sum_{i = 1}^N  \widehat h(X_i, S_i)S_{ir} X_{ip}}{\sum_{i = 1}^N  \widehat h(X_i, {S}_i) S_{ir}}
\end{align*}
 is generally small because both terms are different estimates of the same thing.

\end{proof}

%%%%%%%%%%%%%%%%%%%%%%   prop 3   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Proof of Proposition 3}
Proposition 3 is a corollary of Theorem 1 in Li et al.,\cite{lif18} which proved the exact balance property of overlap weights in the overall sample. Below we will first reproduce the proof of Theorem 1 and then extend it to subgroups as in Proposition 3. %We further show that the exact balance property in subgroups follows as a corollary of Theorem 1.

\textbf{Theorem 1.} \emph{When the propensity scores are estimated by maximum likelihood under a logistic regression model, $\mathrm{logit}\{e(X_i)\}=\beta_0+X_i\beta'$, the overlap weights lead to exact balance in the means of any included covariate between treatment and control groups. That is, for any covariate $j$, we have}
\begin{equation} \label{eq:exact_balance}
\frac{\sum_i X_{ij}Z_i(1-\hat{e}_i)}{\sum_i Z_i(1-\hat{e}_i)}
=\frac{\sum_i X_{ij}(1-Z_i)\hat{e}_i}{\sum_i (1-Z_i)\hat{e}_i}, \quad \mbox{for} ~~ j=1,\dots, P,
\end{equation}
\emph{where $\hat{e}_i= \{1+\exp[-(\hat{\beta}_0 +X_i\hat{\beta}')]\}^{-1}$ and $\hat{\beta}=(\hat{\beta}_1,...,\hat{\beta}_P)$ is the MLE for the regression coefficients}.

\begin{proof}
The score functions of the logistic propensity score model, $\mbox{logit}\{e(x_i; \beta)\}=\beta_0+x_i\beta'$ with $\beta=(\beta_1,...,\beta_P)$, are:
\begin{equation}
\frac{\partial \log L}{\partial \beta_j} = \sum_i x_{ij} (Z_i -e_i), \quad \mbox{for} ~~ j=0, 1,\dots, P, \label{sq:score}
\end{equation}
where $x_{0j}\equiv 1$ and $e_i\equiv e(x_i; \beta)=\left[1+\exp(-({\beta}_0+x_i \beta')\right]^{-1}$.

Equate the score functions to 0 and solve for the MLE $\hat\beta$, we have
\[\sum Z_i = \sum \hat{e}_i, \quad \mbox{and} \quad  \sum x_{ij} Z_i = \sum x_{ij} \hat{e}_i.\]
where $\eh=e(x_i; \hat{\beta)}$.
It follows that
\begin{eqnarray}
\sum_i Z_i(1-\hat{e}_i)&=& \sum \hat{e}_i - \sum_i Z_i\hat{e}_i=\sum \hat{e}_i(1-Z_i), \label{eq:intercept}\\
\sum_i x_{ij}Z_i(1-\hat{e}_i)&=& \sum x_{ij} \hat{e}_i - \sum_i x_{ij}Z_i\hat{e}_i=\sum x_{ij} \hat{e}_i(1-Z_i), \label{eq:maineffect}
\end{eqnarray}
for $j=1,\dots, P.$  Therefore, for any $j$, we have
\begin{equation}
\frac{\sum_i x_{ij}Z_i(1-\hat{e}_i)}{\sum_i Z_i(1-\hat{e}_i)}
=\frac{\sum_i x_{ij}(1-Z_i)\hat{e}_i}{\sum_i (1-Z_i)\hat{e}_i}. \label{eq:exact_balance_proof}
\end{equation}
\end{proof}

\textbf{Corollary (i.e. Proposition 3)}: If the postulated logistic model for propensity score, $\mathrm{logit}\{e(X_i)\}=\beta_0+X_i\beta'$, includes any interaction term of a binary covariate as a predictor, then the overlap weights lead to exact balance in the means in the subgroups defined by that binary covariate.

\begin{proof}
For simplicity, consider the case where there are only two covariates $X_1$ and $X_2$, where $X_1$ is binary. The interaction term is $X_1X_2=X_2$ for units with $X_1=1$, and $X_1X_2=0$ for units with $X_1=0$. If the postulated propensity score model include the interaction term $X_1X_2$ as a predictor, e.g. $\mathrm{logit}\{e(X_i)\}=\beta_0+X_{i1}\beta_1+X_{i2}\beta_2+X_{i1}X_{i2}\beta_{12}$, then
\begin{enumerate}
\item[i] For units $i$ with $X_{i1}=0$, the exact balance of the interaction term trivially stands because the interaction term equals zero for these units.
\item[ii] For units $i$ with $X_{i1}=1$, the exact balance of the interaction term also holds by directly applying the interaction term to Equation \eqref{eq:maineffect} (and thus Equation \eqref{eq:exact_balance_proof}), which becomes:
\[\frac{\sum_{i:X_{i1}=1} X_{i2}Z_i(1-\hat{e}_i)}{\sum_i Z_i(1-\hat{e}_i)}
=\frac{\sum_{i:X_{i1}=1} X_{i2}(1-Z_i)\hat{e}_i}{\sum_i (1-Z_i)\hat{e}_i}.\]
\end{enumerate}
\end{proof}

The \emph{absolute standardized mean difference}(ASMD) \cite{austin2015moving} is widely used for measuring covariate balance. The ASMD is the difference in weighted means further scaled by the pooled, unweighted standard deviation of $X_p$.  That is
\begin{equation}
\text{ASMD}_{r,p} = \frac{ \sum_{i = 1}^N Z_i S_{ir} w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i  X_{ip} }{s_{r,p}}
 \label{asmd}
 \end{equation}
where $s_{r,p}$ is the pooled, unweighted sample standard deviation for the $p^{th}$ covariate in the $r^{th}$ subgroup (i.e. $s_{r,p}&=\sqrt{\frac{s_{r,p,1}^2+s_{r,p,0}^2}{2}}$). We define the subgroup mean within arm $z= 0, 1$ as $\bar{X}_{p,0}$ and $\bar{X}_{p,1}$, subgroup sample size within arm $z= 0, 1$ as $N_{r0}$ and $N_{r1}$. Finally, the subgroup sample standard deviation within arm $z= 0, 1$ is
\begin{eqnarray*}
s_{r,p,1}^2&=N_{r1}^{-1}&\sum_iZ_i S_{ir}(X_{ip}-\bar{X}_{p,1})^2,
\end{eqnarray*}
and
\begin{eqnarray*}
s_{r,p,0}^2&=N_{r0}^{-1}&\sum_i(1-Z_i) S_{ir}(X_{ip}-\bar{X}_{p,0})^2.
\end{eqnarray*}
Here, we use the unweighted sample variance to set a common denominator and therefore facilitate comparisons across different weighting methods.
%%%%%%%%%%%%%%%%%%%%%%   prop 4   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Proposition 4 (Non-linear covariates)}
Suppose the regression of Y on $\bm{X}$ is non-linear and the outcome surface satisfies a generalized additive model
\begin{equation*}
Y_i(z) =  \sum_{r = 1}^R \beta_r S_{ir}  +   \sum_{r = 1}^R\sum_{p = 1}^P f_{rp}(X_{ip})S_{ir} +
 \sum_{r = 1}^R\lambda_r  S_{ir} z + \sum_{p = 1}^P g_{rp}(X_{ip})S_{ir} z +\epsilon_i(z),
\label{eq: outcome}
\end{equation*}
where each $f_{rp}(X), g_{rp}(X)$ is a K-times differentiable, non-linear function at all $X_{ip}$, with $f_{rp}^{(K)} \le C_1, g_{rp}^{(K)} \le C_2,$ for all $r,p$, and $E(\epsilon_i|\bm{X}_i, \bS_i)=0$. If balance holds in higher order terms for the transformed covariates $\Tilde X_{ijp}^k$, i.e.,
\begin{eqnarray}
\left| \sum_{i = 1}^N Z_i S_{ir}   w_i \Tilde X_{ijp}^k - \sum_{i = 1}^N (1 - Z_i)S_{ir}   w_i \Tilde X_{ijp}^k \right| &<& \delta_{1,pk},
\end{eqnarray}
And if 
\begin{eqnarray}
\left| \sum_{i = 1}^N Z_i S_{ir}   w_i \Tilde X_{ijp}^k -  \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir} \Tilde X_{ijp}^k }{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}} \right| &<& \delta_{2,pk},
\end{eqnarray}
for each $k=1,\dots, K$, $j = 1, 2,\dots, M_p/l_p$ and $p=1,\dots,P$. Then the bounding bias is
\begin{align*}
\E \left(\widehat \tau_{r,h} - \tau_{r,h} \right) &< \delta_{1,pk} \sum_{p = 1}^P \sum_{k = 0}^K\sum_{j=1}^{M_p/l_p}|\eta_{rjpk}|+\delta_{2,pk}\sum_{p = 1}^P \sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p}  |\phi_{rjpk}|+2P \frac{M_p}{l_p}\frac{C_1}{K!} (l_p/2)^K+2P \frac{M_p}{l_p}\frac{C_2}{K!} (l_p/2)^K,
\end{align*}
where $\eta_{rjpk}, \phi_{rjpk}$'s are the coefficients of the Taylor expansion of $f_{rp}(X_{ip}), g_{rp}(X_{ip})$ at order k around $\xi_{jp}$. 
\renewcommand*{\proofname}{\textbf{Proof}}
\begin{proof}
Similar to Zubizarreta,\cite{zubizarreta2015stable} for each $X_{ip}$ we break its support $[-M_p/2,M_p/2] \in R$
into $M_p/l_p$ disjoint intervals of length $l_p$ and midpoint $\xi_{jp}$, and define the transformed piecewise covariates centered around $\xi_{jp}$ as $\Tilde X_{ijp}= (X_{ip}-\xi_{jp})\mathbbm{1}_{X_{ip}\in[\xi_{jp}-l_p/2,\xi_{jp}+l_p/2]}$.

The $k^{th}$ order Taylor expansion of $f_{rp}(X_{ip}), g_{rp}(X_{ip})$ at $\xi_{jp}$ is 
\begin{align*}
f_{rp}(X_{ip})&= \sum_{k=0}^{K-1} \frac{f_{rp}^{(k)}(\xi_{jp})}{k!} (X_{ip}-\xi_{jp})^{k} + \frac{f_{rp}^{(K)}(\xi_{jp}')}{K!} (X_{ip}-\xi_{jp})^{K} =\sum_{j=1}^{M_p/l_p}\left( \sum_{k=0}^{K-1} \eta_{rjpk} \Tilde X_{ijp}^k + R_{rijpK}\right) \\%&=f_{rp}(\xi_{jp})\mathbbm{1}_{X_{ip}\in[\xi_{jp}-l_p/2,\xi_{jp}+l_p/2]}+\sum_{j=1}^{M_p/l_p}\left( \sum_{k=1}^{K-1} \eta_{rjpk} \Tilde X_{ijp}^k + R_{rijpK}\right),\\
g_{rp}(X_{ip})&= \sum_{k=0}^{K-1}
\frac{g_{rp}^{(k)}(\xi_{jp})}{k!} (X_{ip}-\xi_{jp})^{k} + \frac{g_{rp}^{(K)}(\xi_{jp}')}{K!} (X_{ip}-\xi_{jp})^{K}= \sum_{j=1}^{M_p/l_p}\left( \sum_{k=0}^{K-1} \phi_{rjpk} \Tilde X_{ijp}^k + T_{rijpK}\right),
\end{align*}
for some $\xi_{jp}'$ between $\xi_{jp}$ and $X_{ip}$, $\eta_{rjpk}=\frac{f_{rp}^{(k)}(\xi_{jp})}{k!}$, and $ \phi_{rjpk}=\frac{g_{rp}^{(k)}(\xi_{jp})}{k!}$. By the Lagrange Error Bound,  $R_{rijpK} =\frac{f_{rp}^{(K)}(\xi_{jp}')}{K!} \Tilde X_{ijp}^{K}\le |\frac{f_{rp}^{(K)}(\xi_{jp}')}{K!} (l_p/2)^K|\le \frac{C_1}{K!}(l_p/2)^K$, and  $T_{rijpK}=\frac{g_{rp}^{(K)}(\xi_{jp}')}{K!} \Tilde X_{ijp}^{K}\le |\frac{g_{rp}^{(K)}(\xi_{jp}')}{K!} (l_p/2)^K|\le \frac{C_2}{K!}(l_p/2)^K$ for all $r = 1, \dots, R; j = 1,\dots, Mp/lp; p = 1, \dots, P$. 

Our target estimand is 
\begin{align*}
\tau_{r,h} &=\frac{\E\left\{h(\bX, \bS) \left[ \lambda_r   + \sum_{p = 1}^P  g_{rp}(X_{p})|S_{r}=1\right]\right\}}{\E[h(\bX,\bS)|S_{r}=1]}
%&=\lambda_r+\frac{E\left\{h(\bX, \bS) \left[ \sum_{p = 1}^P g_{rp}(X_{p})|S_{r}=1\right]\right\}}{E[h(\bX,\bS)|S_{r}=1]}
%\tau_{r,h} &=\frac{\sum_i  h(\bm{X}_i,\bm{S}_i) \left[ \lambda_r   + \sum_{p = 1}^P  g_{rp}(X_{p})\right]S_r}{\sum_i  h(\bm{X}_i,\bm{S}_i)S_r}=\lambda_r+\frac{\sum_i  h(\bm{X}_i,\bm{S}_i) \left[  \sum_{p = 1}^P  g_{rp}(X_{p})\right]S_r}{\sum_i  h(\bm{X}_i,\bm{S}_i)S_r}
\end{align*}
Then
\begin{align}
\left| \E\left(\widehat{\tau}_{r,h} - \tau_{r,h} \right) \right| & =
\left| \E \left[ \sum_{i = 1}^N Z_i S_{ir}   w_i Y_i - \sum_{i = 1}^N (1 - Z_i)S_{ir}  w_i Y_i \right] - \tau_{r,h} \right| \nonumber \\
&=\left| \sum_{i = 1}^N Z_i S_{ir}   w_i \left(\beta_r  +   \sum_{p = 1}^P f_{rp}(X_{ip}) +
  \lambda_r  + \sum_{p = 1}^P g_{rp}(X_{ip} )\right)-  \right.\nonumber\\
  &\hspace{40pt}\left. \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i \left(\beta_r  +   \sum_{p = 1}^P f_{rp}(X_{ip})\right)- \tau_{r,h}\right| \nonumber \\
  &=\left| \beta_r  \left[ \sum_{i = 1}^N Z_i S_{ir}   w_i - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i \right] \right. + \label{eq:18}\\
& \hspace{40pt} \sum_{p = 1}^P  \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i f_{rp}(X_{ip}) - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i f_{rp}(X_{ip}) \right] + \label{eq:19}\\
&\hspace{40pt} \lambda_r \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i - 1 \right] + \label{eq:20}\\
& \hspace{40pt} \sum_{p = 1}^P \left[\sum_{i = 1}^N Z_i S_{ir}  w_i g_{rp}(X_{ip}) - \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir} g_{rp}(X_{ip})}{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}} \right]   \label{eq:21}\\
& \hspace{40pt} \left. \sum_{p = 1}^P \left[\frac{\sum_{i = 1}^N  h(X_i, S_i) S_{ir}g_{rp}(X_{ip})}{\sum_{i = 1}^N  h(X_i, S_i) S_{ir}}-\frac{\E[h(\bm{X},\bm{S})g_{rp}(X_{p})|S_{r}=1]}{\E[h(\bm{X},\bm{S})|S_{r}=1]} \right] \right| \label{eq: 22}
\end{align}
where equation (\ref{eq:18}) = 0 by the definition of weights, equation (\ref{eq:20}) = 0  by design of weights, and the expectation of equation (\ref{eq: 22}) = 0.
% &= \sum_{i = 1}^N   X_{ip}\left(\frac{Z_i  h(x_i)}{e_i(x)}- \frac{h_i(x_i)}{\sum_{i = 1}^N  h(x_i) }  \right)\\
%&= \sum_{i = 1}^N   X_{ip}h_i(x_i)\left(\frac{Z_i}{e_i(x)}- \frac{1}{\sum_{i = 1}^N  h(x_i) } \right)
It follows
\begin{align*}
 &\left| \E\left(\widehat{\tau}_{r,h} - \tau_{r,h} \right) \right| =%\left| \sum_{p = 1}^P \beta_{p} \left[ \sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N (1 - Z_i)  w_i X_{ip} \right]+ \sum_{p = 1}^P \gamma_{p} \left[\sum_{i = 1}^N Z_i   w_i X_{ip} - \sum_{i = 1}^N  h^*(x_i)  X_{ip} \right] \right|\\
  \left|\eqref{eq:19}+\eqref{eq:21}\right|\\
 &=\left|\sum_{p = 1}^P  \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i \left(\sum_{j=1}^{M_p/l_p} \sum_{k=0}^{K-1} \eta_{rjpk} \Tilde X_{ijp}^k + R_{rijpK}\right) -  \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i \left(\sum_{j=1}^{M_p/l_p} \sum_{k=0}^{K-1} \eta_{rjpk} \Tilde X_{ijp}^k + R_{rijpK}\right)\right]+ \right.\\
&\hspace{40pt}\left.  \sum_{p = 1}^P \left[\sum_{i = 1}^N Z_i S_{ir}  w_i \left(\sum_{j=1}^{M_p/l_p} \sum_{k=0}^{K-1} \phi_{rjpk} \Tilde X_{ijp}^k + T_{rijpK}\right) - \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir} (\sum_{j=1}^{M_p/l_p} \sum_{k=0}^{K-1} \phi_{rjpk} \Tilde X_{ijp}^k + T_{rijpK})}{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}} \right] \right|\\
&=\left|\sum_{p = 1}^P\sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p} \eta_{rjpk}  \left[ \sum_{i = 1}^N Z_i S_{ir}  w_i  \Tilde X_{ijp}^k - \sum_{i = 1}^N (1 - Z_i) S_{ir} w_i  \Tilde X_{ijp}^k\right]+  \right.\\
&\hspace{40pt}  \sum_{p = 1}^P \sum_{k=0}^{K-1} \sum_{j=1}^{M_p/l_p} \phi_{rjpk}\left[\sum_{i = 1}^N Z_i S_{ir}  w_i \Tilde X_{ijp}^k  - \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}\Tilde X_{ijp}^k }{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}} \right]+\\
&\hspace{40pt} \sum_{p = 1}^P\sum_{j=1}^{M_p/l_p}\left(\sum_{i = 1}^N Z_i S_{ir}  w_i R_{rijpK}-\sum_{i = 1}^N (1-Z_i) S_{ir}  w_i R_{rijpK} \right)+\\
&\hspace{40pt}  \left. \sum_{p = 1}^P \sum_{j=1}^{M_p/l_p}\left(\sum_{i = 1}^N Z_i S_{ir}  w_i T_{rijpK}- \frac{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}T_{rijpK} }{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}}\right)\right|\\
&\le \sum_{p = 1}^P\sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p} \delta_{1,pk} |\eta_{rjpk}|+\sum_{p = 1}^P \sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p} \delta_{2,pk} |\phi_{rjpk}|+\\
&\hspace{40pt}\sum_{p = 1}^P\sum_{j=1}^{M_p/l_p}\left(\sum_{i = 1}^N |R_{rijpK}| \left|Z_i S_{ir}  w_i -(1-Z_i) S_{ir}  w_i\right| \right)+ \sum_{p = 1}^P\sum_{j=1}^{M_p/l_p} \left(\sum_{i = 1}^N \left|T_{rijpK}\right|\left|Z_i S_{ir}  w_i - \frac{  h(\bm{X}_i, \bm{S}_i) S_{ir} }{\sum_{i = 1}^N  h(\bm{X}_i, \bm{S}_i) S_{ir}}\right|\right)\\
&\le \sum_{p = 1}^P\sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p} \delta_{1,pk} |\eta_{rjpk}|+\sum_{p = 1}^P \sum_{k=0}^{K-1}\sum_{j=1}^{M_p/l_p} \delta_{2,pk} |\phi_{rjpk}|+2P \frac{M_p}{l_p}\frac{C_1}{K!} (l_p/2)^K+2P \frac{M_p}{l_p}\frac{C_2}{K!} (l_p/2)^K.
\end{align*}
\end{proof}


\section{ Additional Information on the Simulations}

\subsection{Propensity Score Distribution Diagnostics}
\label{app_subsec:ps_overlap}

We first investigate the distributions of true PS by each treatment arm in the simulated data. The data are evaluated in terms of the extreme PS values and degree of overlap between two treatment arms. Figure~\ref{f:ps_hist} summarizes the true propensity score distribution across values of $\kappa$ (across columns) and $\psi$, $\gamma$ (down rows). The resulting propensity score distributions vary from showing low confounding with substantial overlap, when $P =20, \gamma=1$, $\kappa=0.75$ and $\psi=0.25$ (upper left panels), to strong confounding with more probability in the tails, when $P =50, \gamma$=1.5, $\kappa=0.25$ and $\psi=0.75$ (lower right panels).



\begin{figure}
\centering
\includegraphics[width = 0.8\textwidth]{ama/Figures/PS.pdf}
\caption{Propensity score distributions for variations of the data generation,$P\in\{18$ (the first two rows), 48  (the last row) $\}$, $\gamma\in\{1, 1.25, 1.5\}$, $\kappa\in\{0.25, 0.5, 0.75\}$, and $\psi\in\{0.25, 0.75\}$.}
\label{f:ps_hist}
\end{figure}

\subsection{Additional Simulation Results: ASMD, bias and RMSE}

\begin{figure}
\centering
\includegraphics[width=6in]{Figures/asmd.pdf}
\caption{Max ASMD over all covariates, calculated in overall sample and four subgroups, across different propensity models and weighting schemes. Each dot represents one of the 72 simulation scenarios.}
\label{asmd}
\end{figure}


\begin{figure}
\centering
\includegraphics[width = 0.8\textwidth]{ama/Figures/bias_la_f1.pdf}
\caption{Bias of IPW main effect logistic model versus OW Post-LASSO across different $\lambda$ values in estimating S-WATE $\tau_{\{S_1=1\}}$, displayed by $\psi\in\{0.25, 0.75\}$ and $P\in\{18,48\}$. Each dot represents one of the 72 simulation scenarios.}
\label{f: bias}
\end{figure}



\begin{figure}
\centering
\includegraphics[width = 0.8\textwidth]{ama/Figures/bias_la_f2.pdf}
\caption{Bias of IPW main effect logistic model versus OW Post-LASSO across different $\kappa$ values in estimating S-WATE $\tau_{\{S_1=1\}}$, displayed by $\psi\in\{0.25, 0.75\}$ and $P\in\{18,48\}$. Each dot represents one of the 72 simulation scenarios.}
\label{f: bias2}
\end{figure}


%\begin{figure}
%\centering
%\includegraphics[width = 0.8\textwidth]{ama/Figures/bias_la_tau.pdf}
%\caption{Bias of IPW main effect logistic model versus OW Post-LASSO across different $\beta_{SZ}$ values in estimating S-WATE $\tau_{\{S_1=1\}}$, displayed by $\psi\in\{0.25, 0.75\}$ and $P\in\{18,48\}$. Each dot represents one of the 72 simulation scenarios.}
%\label{f: bias}
%\end{figure}

\begin{figure}
\centering
\includegraphics[width = 0.8\textwidth]{ama/Figures/rmse_la_f1.pdf}
\caption{RMSE of IPW main effect logistic model versus OW Post-LASSO across different $\lambda$ values in estimating S-WATE $\tau_{\{S_1=1\}}$, displayed by $\psi\in\{0.25, 0.75\}$ and $P\in\{18,48\}$. Each dot represents one of the 72 simulation scenarios.}
\label{f: rmse}
\end{figure}



\begin{figure}
\centering
\includegraphics[width = 0.8\textwidth]{ama/Figures/rmse_la_f2.pdf}
\caption{RMSE of IPW main effect logistic model versus OW Post-LASSO across different $\kappa$ values in estimating S-WATE $\tau_{\{S_1=1\}}$, displayed by $\psi\in\{0.25, 0.75\}$ and $P\in\{18,48\}$. Each dot represents one of the 72 simulation scenarios.}
\label{f: rmse2}
\end{figure}
\clearpage

\subsection{Additional Simulation Study on Variance and Coverage Rate }
We have conducted an additional small simulation to examine how variable selection in propensity scores affects variance estimation and the coverage rate of different methods discussed in the paper. 
 First, we compared three methods for estimating the variance: (1) Re-estimate the propensity score (PS) using post-LASSO on each bootstrap sample, and estimate the causal effects with this PS; (2) Estimate PS only on the original sample using post-LASSO and treat this estimated PS as fixed when estimating the causal effects in each bootstrap sample; (3) Use the robust sandwich variance. Method (2) is justified based on  a large amount of literature which suggests that propensity score uncertainty does not have have to be accounted for when using propensity score approaches.\cite{ho2007matching, Hirano2003} Method (3) is justified based on if the propensity score is estimated via the standard maximum-likelihood estimation of a generalized linear model, then both bootstrapping (i.e. refit the propensity score model in each bootstrap sample) or M-estimation (i.e. sandwich estimator obtained via the stacked estimating equations\cite{lunceford04}) would accurately quantify the uncertainty due to estimating the propensity scores. Method (1) is considered here in order to investigate the performance of bootstraping the LASSO propensity score, though we caution against the use of Method (1) in practice due to lack of theoretical justification.
 
 We compared these three variance methods with the Monte Carlo standard deviation (MC\_SD) in two simulation scenarios to estimate the overall treatment effect. Scenario 1 corresponds to a simple case in our simulation study described in the Section 5 ($N=1000, P=18, \phi=0.75,\gamma=1, \kappa=0.5,\beta_{sz}^T=(0.5,0.5)$). Scenario 2 corresponds to a situation where the sample size is small, and the number of covariates is large with small coefficients ($N=200, P=100, \phi=1,\gamma=0.1, \kappa=0.5,\beta_{sz}^T=(0,0)$). Since the number of truly non-zero coefficients in the propensity score model is substantially larger than the sample size ($N = 200$ but 300 terms with small coefficients are included in the true propensity score when incorporating covariate-subgroup interactions), we expect re-fitting the LASSO to perform poorly in Scenario 2 due to instability in the covariates that will be chosen across bootstrap samples.

Web Table \ref{t:var} shows the results of this simulation study. The robust sandwich estimator is very close to the bootstrap with fixed PS in both scenarios. In Scenario 1, under large sample size, the Lasso estimate is similar to the ordinary least squares estimate, and therefore the variance from bootstrap with re-estimated PS is close to other methods. In Scenario 2, the re-estimated PS has larger variance probably due to selected covariates changing often from bootstrap to bootstrap sample. Except for IPW-pLASSO in Scenario 2, the variance estimate from bootstrap with fixed PS and sandwich estimator is close to the Monte Carlo SD. 

\begin{table}[ht]
\caption{Variance comparison by different estimation methods
}
\centering
\begin{tabular}{rrrrrll}
  \hline
  MC\_SD & Sandwich & Re-est PS & Fixed PS & PS model & Weight \\ 
  \hline
  \textbf{Scenario 1} &  &  &  &  & \\ 
  0.09 & 0.11 & 0.08 & 0.11 & LASSO & OW \\ 
    0.11 & 0.11 & 0.08 & 0.11 & pLASSO & OW \\ 
    0.11 & 0.13 & 0.11 & 0.13 & LASSO & IPW \\ 
    0.15 & 0.15 & 0.15 & 0.15 & pLASSO & IPW \\
    \textbf{Scenario 2}&  &  &  &  & \\ 
 0.15 & 0.15 & 0.16 & 0.15 & LASSO & OW \\ 
  0.16 & 0.16 & 0.24 & 0.16 & pLASSO & OW \\ 
  0.15 & 0.15 & 0.28 & 0.15 & LASSO & IPW \\ 
  0.31 & 0.19 & 0.35 & 0.21 & pLASSO & IPW \\ 
   \hline
\end{tabular}
\label{t:var}
\end{table}

We also used all three methods in our COMPARE-UF application. Results for all three methods were practically identically. 
The confidence intervals in Figure 4 of the manuscript are based on the robust sandwich variance estimator.

In addition, we examined the coverage rate of Logistic-Main, LASSO, pLASSO and random forests (RFs) under three scenarios, corresponding to low confounding with substantial overlap ($P =18, \gamma=1$, $\kappa=0.5$ and $\psi=0.25$; [1,2] in Web Figure 1), moderate confounding and overlap ($P =18, \gamma=1.25$, $\kappa=0.5$ and $\psi=0.75$; [2,2] in Web Figure 1), and strong confounding with more probability in the tails ($P =48, \gamma$=1.5, $\kappa=0.5$ and $\psi=0.75$; [3,2] in Web Figure 1). The confidence interval is estimated by 1000 bootstrap samples with fixed PS. Web Table \ref{tb:cov}
shows that the coverage rates of pLASSO  are close to the nominal 95\% levels under low and moderate confounding, and slightly lower than 95\% under strong confounding. LASSO fails to maintain the nominal coverage rate under moderate or strong confounding, probably due to the shrinkage bias. The coverage rates of Logistic-Main are slightly lower than 95\% under low confounding, but are substantially lower than 95\% under moderate and strong confounding. RFs fail to maintain the nominal coverage rate in all scenarios. This further validates pLASSO as our preferred method for building the propensity score model. 

\begin{table}[htbp]\centering
\caption{Coverage rate of different propensity score methods in subgroups. The results are based on $1000$ simulations.}

\label{tb:cov}
\begin{tabular}{crrrrcrrrr}
\toprule
& && \multicolumn{2}{c}{OW} & \phantom{a} & & \multicolumn{2}{c}{IPW} \\
\cmidrule{2-5} \cmidrule{7-10} 
& S1=0 & S1=1 & S2=0 & S2=1 && S1=0 & S1=1 & S2=0 & S2=1 \\  
\midrule
%\multirow{9}{*}{$m=10$}  
\textbf{Low confounding} &  &  &  & & &  &  &  &  \\ 
 Logistic-Main & 0.91 & 0.83 & 0.93 & 0.84 & &0.79 & 0.85 & 0.81 & 0.86 \\ 
  LASSO & 0.95 & 0.91 & 0.96 & 0.91 & &0.88 & 0.93 & 0.90 & 0.93 \\ 
  pLASSO & 0.95 & 0.95 & 0.98 & 0.95 & &0.93 & 0.96 & 0.94 & 0.95 \\ 
  RFs & 0.44 & 0.86 & 0.42 & 0.87 & &0.58 & 0.87 & 0.58 & 0.89 \\ 
 
%\multirow{9}{*}{$m=20$} 
\textbf{Moderate confounding} &  &  &  & & &  &  &  &  \\ 
Logistic-Main  & 0.29 & 0.02 & 0.29 & 0.03& & 0.15 & 0.02 & 0.15 & 0.02 \\ 
  LASSO & 0.88 & 0.60 & 0.87 & 0.61& & 0.56 & 0.72 & 0.58 & 0.73 \\ 
  pLASSO & 0.98 & 0.98 & 0.98 & 0.97& & 0.93 & 0.98 & 0.92 & 0.98 \\ 
  RFs & 0.00 & 0.83 & 0.00 & 0.82& & 0.00 & 0.84 & 0.00 & 0.83 \\ 
%\multirow{9}{*}{$m=50$}
\textbf{Strong confounding} &  &  &  & & &  &  &  &  \\ 
Logistic-Main & 0.00 & 0.00 & 0.00 & 0.00& & 0.22 & 0.00 & 0.17 & 0.00 \\ 
  LASSO & 0.06 & 0.00 & 0.06 & 0.00& & 0.18 & 0.20 & 0.16 & 0.19 \\ 
  pLASSO & 0.89 & 0.83 & 0.88 & 0.82& & 0.70 & 0.90 & 0.70 & 0.89 \\ 
  RFs & 0.00 & 0.01 & 0.00 & 0.01& & 0.00 & 0.01 & 0.00 & 0.01 \\ 
   \hline
\bottomrule
\end{tabular}
\end{table}

\subsection{Additional Results on COMPARE-UP Analysis}

\begin{figure}[ht]

\centering\includegraphics[width=14cm]{ama/Figures/appendix_baseline.png} 
\caption[]{The Weighted Baseline Characteristics Table by Procedure Type. }
\label{fig:baseline}
\end{figure}


\includepdf[pages=-,scale=0.75]{ama/Figures/AllDotPlots.pdf}

%\bibliography{wileyNJD-AMA}%
\bibliography{SGAOW}%

\end{document} 