 nonparametric doubly robust test for a continuous treatment effec



Introduction {#sec:intro}
============

Setup and method {#sec:setup-method}
================

Notation, data and setup
------------------------

We use the following notation throughout. Let $(\bs{Z}_1,\ldots,\bs{Z}_n)$ be the observed sample where each observation is an independent copy of the tuple $\bs{Z}=(\bs{L},A,Y)$ with support $\mc{Z}=\mc{L}\times\mc{A}\times\mc{Y}$. Here $\mc{L}\subseteq\RR^d$ and $\bs{L}$ is the vector containing the $d$ potential confounder variables (covariates); $\mc{A}\subseteq \RR$ and $A$ is the continuous treatment dosage received; $\mc{Y}\subseteq\RR$ and $Y$ is the observable outcome of interest. We let $P$ denote the distribution of $\bs{Z}$ and $p_0(\bs{z})=p_0(y|\bs{l},a)p_0(a|\bs{l})p_0(\bs{l})$ denote the corresponding density function with respect to some dominating measure $\nu$. Let $\mu_0(\bs{l},a):=\EE(Y|\bs{L}=\bs{l},A=a)$ denote the outcome regression function. Similarly, let $\pi_0(a|\bs{l}):=\frac{\partial}{\partial
  a}P(A\le a|\bs{L}=\bs{l})$ denote the conditional density or propensity score function of $A$ given $\bs{L}$ and $\varpi_0(a):=\frac{\partial}{\partial a}P(A\le
a)$ denote the marginal density function of $A$ (both of which densities are assumed to exist). For a function $f$ on $\RR$, we let $\PP\{f(\bs{Z})\}:=\int_{\mc{Z}}f(\bs{z})\,dP(\bs{z})$. And for $p\ge 1$, we use $\|f\|_p:=\{\int f(\bs{z})^p\,d P(\bs{z})\}^{1/p}$ to denote the $L_p(P)$ norm and use $\|f\|_{\mc{X}}:=\sup_{x\in \mc{X}}|f(x)|$ to denote the uniform norm over the range $\mc{X}$. We use $\PP_n$ to denote the empirical distribution defined on the observed data so that $\PP_n\{f(\bs{Z})\}:=\int
f(\bs{z})\,d\PP_n(\bs{z})=n^{-1}\sum^n_{i=1}f(\bs{Z}_i)$. To characterize the problem, let $Y^a$ be the potential outcome [@Psychology:uk] when treatment level $a$ is applied. Then the causal estimand that we are interested in learning about (developing a hypothesis test for) is $\theta_0(a):=\EE(Y^a)$, and we wish to test if this function is constant. Specifically, we want to test $$\label{eq:11}
  H_0\colon
  % \text{ all } a\in \mc{A},
  % \text{ some } c \in \RR,
  % \theta_0(a) = c
  \theta_0 \equiv c \in \RR
  \, \text{ versus } \,
  H_1\colon \theta_0 \text{ is nonconstant},$$ where we will assume that $\theta_0(\cdot)$ satisfies some smoothness assumptions if it is nonconstant.

Proposed method {#sec:proposed-method}
---------------

In @Kennedy:2017cq, the authors derived a doubly robust mapping for estimating the continuous treatment effect curve. Like doubly robust estimators in binary treatment cases, the doubly robust mapping depends on both the outcome regression function and the propensity score function, and can be written $$\begin{aligned}
  \label{eq:dr-mapping}
  \xi(\bs{Z};\pi,\mu) = \frac{Y-\mu(\bs{L},A)}{\pi(A|\bs{L})}
  \int_{\mc{L}}\pi(A|\bs{l})\,dP(\bs{l})+\int_{\mc{L}}\mu(\bs{l},A)\,dP(\bs{l}).\end{aligned}$$ where $\pi(a| \bs l)$ and $\mu(\bs l, a)$ are some propensity score and outcome regression functions, respectively. The above mapping has the desired property of double robustness in that $$\begin{aligned}
  \label{eq:dr-property}
  \EE\lb\xi(\bs{Z};\pi,\mu) | A = a\rb
  =\theta_0(a),\end{aligned}$$ provided either $\mu=\mu_0$ or $\pi=\pi_0$ [@Kennedy:2017cq]. Thus $\theta_0(\cdot)$ could be estimated using standard nonparametric smoothing techniques if either $\mu_0$ or $\pi_0$ were known. Since we do not actually know $\mu_0,\pi_0$, we plug in estimators $\widehat{\mu}$, $\widehat{\pi}$ for $\mu_0$, $\pi_0$. To compute $\xi$ we also need to know $dP(\bs l)$ in two places; since we do not, we plug in $\PP_n(\bs{l})$ for $P(\bs{l})$, and we denote this by $\wh \xi$. Thus, our estimate of the pseudo-outcome $\xi( \bs Z; \pi_0, \mu_0)$ is $$\begin{aligned}
  \label{eq:pseudo-outcome}  \widehat{\xi}(\bs{Z};\widehat{\pi},\widehat{\mu})=\frac{Y-\widehat{\mu}(\bs{L},A)}{\widehat{\pi}(A|\bs{L})}\int_{\mc{L}}\widehat{\pi}(A|\bs{l})\,d\PP_n(\bs{l})+\int_{\mc{L}}\widehat{\mu}(\bs{l},A)\,d\PP_n(\bs{l}).\end{aligned}$$ We can then apply a nonparametric estimation procedure to the (observed) tuples $\{(\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu}),A_i)\}_{i=1}^n$. @Kennedy:2017cq show that when at least one of the estimators is consistently estimated, then under some assumptions about complexity and boundedness conditions of $\wh
\mu$ and $\wh \pi$ and the product of their convergence rates, the convergence rate of the nonparametric estimator is the same as if we know the true $\mu_0$ or $\pi_0$. @Kennedy:2017cq apply a local linear estimator to the pseudo-outcome to estimate $\theta_0(\cdot)$ and show the above-stated property on the pointwise convergence rate of the nonparametric estimator. In this paper, we are interested in a different problem: testing if $\theta_0(\cdot)$ is constant or not. As in the estimation problem, in the setting where we (unrealistically) know one of $\mu_0$ or $\pi_0$, testing whether $\theta_0(\cdot)$ is constant becomes a standard regression problem, and we can consider many possible nonparametric tests to the tuples $\{(\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu}),A_i)\}_{i=1}^n$. As described in Section \[sec:intro\], not all tests will be doubly robust for testing, though.

In @Hardle:1993ih, the authors consider the problem of testing parametric null linear models (not in a causal setting) and construct test statistics based on the integrated difference between the nonparametric model estimated using the Nadaraya-Watson estimator and the parametric null model. @alcala1999goodness extended the test to allow using a local polynomial estimator [@Fan:1996tk] for the nonparametric model. We propose to test our hypothesis of a constant treatment effect curve (i.e., no treatment effect) using the following statistic $$\begin{aligned}
  \label{eq:test-stat}
  T_n=n\sqrt{h}\int_{\mc{A}}\lp\widehat{\theta}_h(a)-\PP_n\widehat{\xi}\rp^2w(a)\,da,\end{aligned}$$ where $w(\cdot)$ is a user-specified weight function, $\widehat{\theta}_h(a)$ is the local linear estimator applied to $\{(\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu}),A_i)\}_{i=1}^n$ and is defined as as $\widehat{\theta}_h(a)=g_{ha}(a)^T\widehat{\beta}_h(a)$, where $g_{ha}(t)=(1,\frac{t-a}{h})^T$ and $$\begin{aligned}
  \widehat{\beta}_h(a)=\argmin_{\beta\in \RR^2}\PP_n\ls K_{ha}(A)\lb\widehat{\xi}(\bs{Z};\widehat{\pi},\widehat{\mu})-g_{ha}(A)^T\beta\rb^2\rs\end{aligned}$$ with $K_{ha}(t)=h^{-1}K\{(t-a)/h\}$. Note: we could define the test statistic $T_n$ based on summing over $A_i$ rather than as a integral against (Lebesgue measure) $da$; as mentioned in @Horowitz_Spokoiny_2001, @dette2001nonparametric, similar results as ours would hold although some constants would change. Note that under the null hypothesis of no treatment effect, $\PP_n\{\xi(\bs{Z};\pi_0,\mu_0)\}$ is an $\sqrt{n}$-consistent estimator of the null model and so is $\PP_n\widehat{\xi}$ provided $\widehat{\mu}, \widehat{\pi}$ are not converging too slowly (see the later discussion). We will see under some mild conditions on the convergence rates of $\widehat{\pi}$ and $\widehat{\mu}$, that $T_n$ converges to a normal distribution similar to the one in @alcala1999goodness under the null model (given in ). However, similar to @Hardle:1993ih and @alcala1999goodness, due to the slow order of convergence of the asymptotically negligible terms that arise in the proof, we do not suggest using the target distribution given in Theorem \[thm:null-normality\] to directly calculate the critical values under the null hypothesis. Instead we advocate using the bootstrap [@Efron:1993dc] to estimate the distribution of $T_n$ to improve the finite sample performance and, more specifically, we use the so-called wild bootstrap [@davidson2008wild] as used in @Hardle:1993ih, @alcala1999goodness and @dette2001nonparametric. In @Hardle:1993ih, the authors show the theoretical properties of three different bootstrap methods: (1) the naive resampling method; (2) the adjusted residual bootstrap; (3) the wild bootstrap and showed only the wild bootstrap gives consistent estimation of the null distribution. These results are again true in our setting: the wild bootstrap is valid whereas the other two are not. Here we provide a brief outline of our proposed test procedure.

1.  Estimate the nuisance functions $(\pi_0,\mu_0)$ with $(\widehat{\pi},\widehat{\mu})$.

2.  Calculate the pseudo-outcomes $\widehat{\xi}(\bs{Z};\widehat{\pi},\widehat{\mu})$ by and construct the local linear estimator $\widehat{\theta}_h(a)$ using $\{(\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu}),A_i)\}_{i=1}^n$.

3.  To generate wild bootstrap samples to estimate the distribution of $T_n$ under the null hypothesis,

    1.  Calculate $\hat{\epsilon}_i=\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu})-\widehat{\theta}_h(A_i)$ or we can also use $\hat{\epsilon}_i=\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu})-\sum_{i=1}^n\widehat{\xi}(\bs{Z}_i;\widehat{\pi},\widehat{\mu})/n$

    2.  For each $i$, generate $\epsilon^{\ast}_i\sim \hat{F}_i$, and use $(\xi_i^{\ast}=\PP_n\wh\xi+\epsilon^{\ast}_i,A_i)$ as bootstrap observations.

    3.  Repeat (b) for $B$ times where $B$ is the desired number of bootstrap samples.

4.  Calculate the test statistic $T_n$ according to . Use wild bootstrap samples to estimate the distribution of $T_n$ under the null hypothesis and let $\widehat{t}^{\ast}_{n,1-\alpha}$ denote the $1-\alpha$ quantile of the estimated distribution, where $\alpha$ is the predetermined significance level. Reject the null hypothesis if $T_n>\widehat{t}^{\ast}_{n,1-\alpha}$.

When generating bootstrap samples, we use $\hat{F}_i$ to estimate the conditional distribution of $\xi(\bs{Z}_i;\bar{\pi},\bar{\mu})$ based on the single residual $\hat{\epsilon}_i$. @Hardle:1993ih use a two point distribution which matches the first three moments of $\hat{\epsilon}_i$ and is defined as $$\begin{aligned}
  \epsilon_i^{\ast}=\lb
  \begin{array}{rr}
    -\hat{\epsilon}_i(\sqrt{5}-1)/2&\text{with probability }
                                     (\sqrt{5}+1)/(2\sqrt{5})\\
     \hat{\epsilon}_i(\sqrt{5}+1)/2&\text{with probability } (\sqrt{5}-1)/(2\sqrt{5})\\
  \end{array}\right.\end{aligned}$$ We also consider another common choice, Rademachar distribution, as proposed in @davidson2008wild. Unlike the two point distribution, Rademachar distribution matches the first two and the fourth moments of $\hat{\epsilon}_i$, but imposes symmetry on $\hat{F}_i$. The distribution can be written down as $$\begin{aligned}
  \epsilon_i^{\ast}=\lb
  \begin{array}{rr}
    -\hat{\epsilon}_i&\text{with probability }
                                     1/2\\
     \hat{\epsilon}_i&\text{with probability } 1/2.\\
  \end{array}\right.\end{aligned}$$

Assumptions {#sec:assumptions}
-----------

Here we introduce the assumptions needed for our theoretical results. Our parameter of interest, $\theta_0(a)$, is defined on the potential outcome $Y^a$ which is not observable. Thus, we need the following identifiability conditions on the observed data.

<span>I</span> \[assm:IA\] $\phantom{blah}$

1.  \[assm:IA-item1\]Consistency: $A=a$ implies $Y=Y^a$.

2.  \[assm:IA-item2\]Positivity: $\pi_0(a|\bs{l})\ge \pi_{\min}>0$ for all $\bs{l}\in
        \mc{L}$ and all $a \in A$.

3.  \[assm:IA-item3\]Ignorability: $\EE(Y^a|\bs{L},A)=\EE(Y^a|\bs{L})$.

We need some further assumptions to regulate the distribution of the observed data and the treatment effect curve $\theta_0(a)$.

<span>D</span> \[assm:DA\] $\phantom{blah}$

1.  \[assm:DA-item1\] The support of $A$ (i.e., $\mc{A}$), is a compact subset of $\RR$.

2.  \[assm:DA-item2\] The treatment effect curve $\theta_0(a)$ and the marginal density function $\varpi_0(a)$ are twice continuously differentiable.

3.  \[assm:DA-item3\]The conditional density $\pi_0(a|\bs{l})$ and the outcome regression function $\mu_0(\bs{l},a)$ are uniformly bounded.

4.  \[assm:DA-item4\]Let $\tau(\bs{l},a) := \Var(Y|\bs{L}=\bs{l},A=a)$ be the conditional variance of $Y$ given covariates and treatment level. Assume there exist $\tau_{\max}>0$ such that $0<\tau(\bs{l},a)\le \tau_{\max}$ for all $\bs{l}\in\mc{L}$ and $a\in\mc{A}$. Moreover, define $$\begin{aligned}
          &S_{\tau}
        :=\{\bs{l}\in \mc{L}:\tau(\bs{l},a)\text{ is a continuous function of
          }a\},\\
          &S_{\pi_0}
        :=\{\bs{l}\in \mc{L}:\pi_0(a|\bs{l})\text{ is a continuous function of
          }a\},\\
          &S_{\mu_0} :=\{\bs{l}\in \mc{L}:\mu_0(\bs{l},a)\text{ is a continuous
          function of }a\};
        \end{aligned}$$ assume we have $P(S_{\tau}\cap S_{\pi}\cap S_{\mu})=1$.

We also impose some conditions on the estimators of the nuisance parameters and the local linear estimator of the treatment effect curve. We assume the estimators for nuisance parameters fall in classes with finite uniform entropy integrals. For a generic class of functions $\mc{F}$, let $F$ denote an envelope function for $\mc{F}$, i.e., $\sup_{f\in \mc{F}}|f|\le
\mc{F}$. Let $N(\epsilon,\mc{F},\|\cdot\|)$ denote the covering number, i.e., the minimal number of $\epsilon$-balls (with distance defined on $\|\cdot\|$) needed to cover $\mc{F}$. Moreover, let $$\begin{aligned}
  \label{eq:uniform-entropy-integral}
  %%  J(\delta,\mc{F},\|\cdot\|_{2,Q})
  J(\delta,\mc{F}, L_2 )
  :=
  \int^{\delta}_0\sup_Q \sqrt{1 + \log N(\epsilon\|F\|_{Q,2},\mc{F},L_2(Q))}\,d\epsilon,\end{aligned}$$ where the sup is over all probability measures $Q$ and $L_2(Q)\equiv\|\cdot\|_{2,Q}$ is the $L_2$ semimetric under distribution $Q$, i.e., $\|f\|_{2,Q}=(\int
f^2\,dQ)^{1/2}$. If $J(1, \mc{F},L_2) < \infty$ we say $\mc{F}$ has a finite uniform entropy integral. A related but stronger condition is based on $$\begin{aligned}
  \label{eq:uniform-entropy-2-integral}
  %%  J(\delta,\mc{F},\|\cdot\|_{2,Q})
  J_2(\delta,\mc{F}, L_2 )
  :=
  \int^{\delta}_0\sup_Q 1 + \log N(\epsilon\|F\|_{Q,2},\mc{F},L_2(Q)) \,d\epsilon,\end{aligned}$$ where we will at times require $J_2(1, \mc{F}, L_2) < \infty$. We also impose a so-called *Vapnik-Chervonenkis (VC)* (Dudley, 1999) type of assumption. If a class of functions $\mc{F}$ is a VC class, we have that $$\begin{aligned}
  \label{eq:def-vc}
  \sup_{Q} N\lp\tau\|F\|_{2,Q},\mc{F},L_2(Q) \rp \le \lp\frac{C}{\tau}\rp^v\end{aligned}$$ for some positive $C,v$ and all $\tau > 0$ (and again the sup is over all probability measures $Q$). These latter two conditions arise in the theory of V-processes. The assumptions we make on our estimators are as follows.

<span>E</span> \[assm:EA\] $\phantom{blah}$

1.  \[assm:EA-item3\] The bandwidth $h\equiv h_n$ fulfills $c^h_1n^{-1/5}\le \liminf
        h_n\le \limsup h_n\le c^h_2n^{-1/5}$ for some constants $0<c^h_1\le c^h_2<\infty$.

2.  \[assm:EA-item1\]Let $\bar{\pi}$ and $\bar{\mu}$ denote the limits of the estimators $\widehat{\pi}$ and $\widehat{\mu}$ such that $\|\widehat{\pi}-\bar{\pi}\|_{\mc{Z}}=o_p(\sqrt{h})$ and $\|\widehat{\mu}-\bar{\mu}\|_{\mc{Z}}=o_p(\sqrt{h})$, where $h$ is the bandwidth used in local polynomial estimator. And we have either $\bar{\pi}=\pi_0$ or $\bar{\mu}=\mu_0$.

3.  \[assm:EA-item2\] The estimators $\widehat{\pi}$, $\widehat{\mu}$ and their limits $\bar{\pi}$, $\bar{\mu}$ are contained in uniformly bounded function classes $\mc{F}_\pi$, $\mc{F}_\mu$, which satisfy condition , with $1/\widehat{\pi}$ also uniformly bounded. Moreover, we assme $P(S_{\bar{\pi}}\cap S_{\bar{\mu}})=1$, where we let sets $S_{\bar{\pi}}
        :=\{\bs{l}\in \mc{L}:\bar{\pi}(a|\bs{l})\text{ is a continuous function of }a\}$ and the other set $S_{\bar{\mu}} :=\{\bs{l}\in \mc{L}:\bar{\mu}(\bs{l},a)\text{ is a continuous
          function of }a\}$.

4.  \[assm:EA-item4\]The kernel function $K$ for the local linear estimator is a continuous symmetric probability density function with support on $[-1,1]$. Moreover, we assume the following class of functions, $$\begin{aligned}
          %% \mc{K}=
          \lb K\lp\frac{\cdot-a}{h}\rp:a\in \RR,h>0 \rb,
        \end{aligned}$$ satisfies condition .

5.  \[assm:EA-item5\] Let $r^{\infty}_n$ and $s^{\infty}_n$ be such that $$\begin{aligned}
         \sup_{a\in\mc{A}} \|\widehat{\pi}(a|\bs{L})-\pi_0(a|\bs{L})\|_2 &= O_p(r^{\infty}_n)\\
        \sup_{a\in\mc{A}}  \|\widehat{\mu}(\bs{L},a)-\mu_0(\bs{L},a)\|_2&=O_p(s^{\infty}_n).
        \end{aligned}$$ We assume $s^{\infty}_nr^{\infty}_n
          = O(1/\sqrt{n})$.

Assumption \[assm:EA\]\[assm:EA-item3\] requires that $h$ is of the order of magnitude for optimal estimation; such $h$ can be achieved a variety of ways (for instance, one can minimize a risk estimate, or perform cross validation [@Fan:1996tk]). Assumption \[assm:EA\]\[assm:EA-item1\] is not a stringent assumption; by definition $\overline \pi, \overline \mu$ are the limits of the estimators $\wh \pi, \wh \mu$; here we force the rate of convergence (in $\| \cdot \|_{\mc Z}$) to these limits (which are not necessarily the truth) to be order $\sqrt{h} = n^{-1/10}$ which is quite slow.

To control rates of convergence we make some assumptions on the complexity of the classes being considered in Assumption \[assm:EA\]\[assm:EA-item2\]; the VC assumption we make implies both and are finite. This VC condition is sufficient for us to apply the theory of V-processes in @Nolan:jw and @Sherman_1994 (see Subsection \[sec:v-process-results\]). All the other empirical process results we rely on only require a finite uniform entropy integral.

Assumption \[assm:EA\]\[assm:EA-item4\] is a standard non-restrictive type of assumption on the user-chosen kernel.

Assumption \[assm:EA\]\[assm:EA-item5\] is a somewhat non-standard assumption, since it combines $L_\infty$ and $L_2$ norms. Note that in parametric settings, $r_n^\infty$ or $s_n^\infty$ may attain $\sqrt{n}$ rates. For instance, in a linear regression, if the regression model is $\mu(\bs l, a) = (\bs l^T, a)\bs{\beta}$, and $\wh{\bs{\beta}}$ is an estimator converging to the true parameter $\bs{\beta}_0$ at $\sqrt{n}$ rate, then $\PP\lp (\bs l^T,a)(\wh{\bs{\beta}} - \bs{\beta}_0) \rp^2
    %% \le \PP 2\ls (\bs l^T)(\wh{\bs{\beta}} - \bs{\beta}_0)^2     + a (\wh{\bs{\beta}} - \bs{\beta}_0)
    \le 2 O_p(n^{-1} ) (a^2 + \PP \| \bs l \|_2^2 ),$ which follows from using the inequality $(a+b)^2 \le 2a^2+2b^2$ and the fact that if $(\wh{\bs{\beta}} - \bs{\beta}_0) = O_p(n^{-1/2})$ then $(\wh{\bs{\beta}} - \bs{\beta}_0) (\wh{\bs{\beta}} - \bs{\beta}_0)^T$ has eigenvalues of order $O_p(n^{-1})$. Taking a square root and a supremum over the bounded set $a \in \mc{A}$ shows that in this case $r_n^\infty$ is order $\sqrt{n}$. Similar results hold in other parametric models for $\mu$ or for $\pi$. Thus indeed, the test is "doubly robust": if one parametric model is well-specified and attains root-$n$ rates, the other may be misspecified.

Many nonparametric or semiparametric examples will also satisfy Assumption \[assm:EA\]\[assm:EA-item5\]; if $r_n^\infty$ and $s_n^\infty$ are both, say, order $n^{-2/5}$ up to polylogarithmic factors, which is the rate one expects from for instance a generalized additive model under twice differentiability, then the assumption is satisfied.

Main results {#sec:main-results}
============

Estimator local asymptotics {#sec:estim-local-asympt}
---------------------------

Our paper uses the framework developed by @Kennedy:2017cq. Before proceeding to our test we discuss some details in @Kennedy:2017cq. In analyzing their error term $R_{n,1}$ in the proof of their Theorem 2, @Kennedy:2017cq state (page 13 of the Web Appendix of @Kennedy:2017cq) that $$\label{eq:12}
  (\PP_n  - \PP) \ls \bs{g}_{ha}(A) K_{ha}(A) \lb \wh{\xi}(\bs{Z}; \wh \pi, \wh \mu) - \xi(\bs Z; \overline \pi, \overline \mu) \rb \rs
  = o_p(1/ \sqrt{nh}).$$ @Kennedy:2017cq state that is true because the mapping $\xi \mapsto \GG_n \sqrt{h} \bs{g}_{ha}(A) K_{ha}(A) \xi(\bs Z)$ is stochastically equicontinuous (which follows from their Lemma 1), and because $  \sup_{\bs z \in \mc Z} \lb \wh{\xi}(\bs{z}; \wh \pi, \wh \mu) - \xi(\bs z;
\overline \pi, \overline \mu) \rb = o_p(1).$ The stochastic equicontinuity is claimed to hold over a class $\Xi$ (which @Kennedy:2017cq define on page 13 of their supplement). Unfortunately, depending on how one interprets the definitions given in @Kennedy:2017cq, $\Xi$ either does not contain $\wh{\xi}(\bs{Z}; \wh \pi, \wh \mu)$ or $\Xi$ does not necessarily satisfy the needed/stated entropy condition (which leads to stochastic equicontinuity). The class $\Xi$ depends on "$(\mc{F}_{\mu},\mc{F}_{\pi},\mc{F}_{\varpi},\mc{F}_m)$"; where $\mc{F}_\mu$, $\mc{F}_\pi$ are the classes functions defined to contain $\pi, \mu$; and $\mc{F}_\varpi$, $\mc{F}_m$ are not explicitly defined. The problem is from the classes $\mc{F}_\varpi$ and $\mc{F}_m$ and the replacement of $dP(\bs l)$ by $d\PP_n(\bs l)$ in two places in the definition of $\wh{\xi}$ (see and , where $\int_{\mc{L}}\pi(A|\bs{l})\,dP(\bs{l})$ and $\int_{\mc{L}}\mu(\bs{l},A)\,dP(\bs{l})$ are replaced by $\int_{\mc{L}}\pi(A|\bs{l})\,d\PP_n(\bs{l})$ and $\int_{\mc{L}}\mu(\bs{l},A)\,d\PP_n(\bs{l})$). In particular, if $\mc{F}_\mu$ is a class with a finite uniform entropy integral it does not immediately follow that $$\label{eq:4}
  \lb a \mapsto \int_{\mc L} f(a,\bs l) dQ(\bs l) : Q \text{ a discrete measure, }  f \in \mc{F}_\mu \rb$$ has a finite uniform entropy integral (although this claim holds for some classes of interest). (And the same issue arises for $\mc{F}_\pi, \mc{F}_\varpi$.) The type of definition given in provides a mechanism to define $\mc{F}_\mu$ and $\mc{F}_\pi$ which would then lead to a class $\Xi$ containing $\wh{\xi}$ but for which the stochastic equicontinuity claim unfortunately would not quite have been proved. Alternatively, one can define $\mc{F}_m$ as $$\label{eq:14}
  \lb a \mapsto \int_{\mc L} \mu(\bs l, a) dP(\bs l) : \mu \in \mc{F}_\mu \rb$$ (where recall $dP$ denotes the true data generating measure) which can be shown to have finite uniform entropy integral (so the stochastic equicontinuity claim would hold) but for which, unfortunately, the corresponding class $\Xi$ does not contain $\wh{\xi}$. (An analogous statement holds for $\mc{F}_\pi$.)

Thus, we believe the proof of Theorem 2 given in @Kennedy:2017cq requires additional assumptions; specifically, we must assume that $\wh{\varpi}(\cdot)$ and $\wh{m}(\cdot)$ lie in some classes $\mc{F}_\varpi$ and $\mc{F}_m$, where we assume (rather than deduce) that these two classes both have finite uniform entropy integral. (For instance, $\mc{F}_\varpi, \mc{F}_m$ could be taken to be as defined in with $\mc{F}$ given as $\mc{F}_\pi$ and $\mc{F}_\mu$, respectively.)

Our results in this paper also hold under these assumptions.

We pursue and present an alternative route to approaching @Kennedy:2017cq's Theorem 2, in which we only make assumptions on $\mc{F}_\pi$,$\mc{F}_\mu$. To us, this seems somewhat more standard than making assumptions directly on a class like the one in , since there are not tools (that we know of) for verifying such assumptions in general. Note that in some particular cases, for instance if $\mc{F}_\mu$ is a class of bounded smooth functions with bounded derivatives up to some order (that has a finite uniform entropy integral), then it may be easy to verify that also has a finite uniform entropy integral.

We use the theory of U- or V-processes to complete the analysis of $\wh{\xi}$. The theory of V-processes allows us to bound the distance between the processes with $\wh{\xi}(\bs Z; \wh \pi, \wh \mu)$ and those with ${\xi}(\bs Z; \wh \pi, \wh \mu)$, so that we can then define $\Xi$ based on $\mc{F}_m$ as given in (analogously for $\mc{F}_\varpi$), so that stochastic equicontinuity will hold over $\Xi$, and the stochastic equicontinuity-based proof of @Kennedy:2017cq can apply. Our Lemma \[lem:1\] completes the analysis of the remainder term $R_{n,1}$ (mentioned above) and thus completes the proof of this variant of @Kennedy:2017cq's Theorem 2. We state the theorem below, which involves an extra complexity condition (about $J_2$) beyond the assumptions stated in @Kennedy:2017cq's Theorem 2. We also add the assumption that $Y$ has finite variance. It seems likely that under the assumptions of Theorem \[thm:kennedy-et-al\_thm2\] (for instance, that $\| \wh \pi - \overline \pi \|_{\mc Z} \to_p 0$ and $\| \wh \mu - \overline \mu \|_{\mc Z} \to_p 0$) that the entropy conditions for the particular V-processes that arise in the theorem proof can be weakened; we did not pursue finding the weakest possible complexity conditions here, but rather assumed the main conditions that arise from the theory of V-processes in @Nolan:jw and @Sherman_1994 (whose theory we rely on). One main takeaway is that we only need complexity conditions directly assumed on $\mc{F}_\mu$ and $\mc{F}_\pi$.

\[thm:kennedy-et-al\_thm2\] Let $\overline{\pi}$ and $\overline{\mu}$ denote fixed functions to which $\wh \pi$ and $\wh \mu$ converge in the sense that $\sup_{\bs z} | \wh \pi - \overline \pi| = o_p(1)$ and $\sup_{\bs z} | \wh \mu - \overline{\mu}| = o_p(1)$. Let $a \in \mc{A}$ denote a point in the interior of the compact support $\mc A$ of $A$. Let Assumption \[assm:IA\] hold, Assumption \[assm:DA\] parts \[assm:DA-item1\], \[assm:DA-item2\], \[assm:DA-item3\] hold, and Assumption \[assm:EA\] parts \[assm:EA-item2\] and \[assm:EA-item4\] hold. Further, assume that $J_2(\infty, \mc{F}, L_2) < \infty$ for $\mc{F} $ equal to $\mc{F}_\mu$ and $\mc{F}_\pi$. Assume $Y$ has finite variance. Assume the conditional density of $\xi(\bs Z; \overline \pi, \overline \mu)$ given $A=a$ is continuous in $a$. Assume $h \equiv h_n \to 0$ and $nh^3 \to \infty$ as $n \to \infty$. Assume either $\overline \pi = \pi_0$ or $\overline \mu = \mu_0$. Let $r_n \equiv r_n(a)$ and $s_n\equiv s_n(a)$ be given by $\sup_{t: |t-a| \le h} \| \wh \pi(t | \bs L) - \pi(t | \bs L) \| = O_p(r_n)$ and $\sup_{t: |t-a| \le h} \| \wh \mu( \bs L, t) - \mu(\bs L, t) \| = O_p(s_n)$. Then $$| \wh \theta_h(a) - \theta(a) |
    = O_p(  (nh)^{-1/2} + h^2 + r_n s_n).$$

We complete the proof of the following lemma, which gives the order of magnitude of $  \PP_n \ls \bs{g}_{ha}(A) K_{ha}(A) \lb \wh{\xi}(\bs{Z}; \wh \pi, \wh \mu) - \xi(\bs Z; \overline \pi, \overline \mu) \rb \rs$, to complete the proof of the theorem.

\[lem:1\] Let the assumptions of Theorem \[thm:kennedy-et-al\_thm2\] hold. Then $$\label{eq:1}
        %% R'_{n,1} :=
    % (\PP_n - \PP) \ls \bs{g}_{ha}(A) K_{ha}(A)
    % \lb \wh{\xi}(\bs{Z}; \wh \pi, \wh \mu) -
    % \xi(\bs{Z}; \overline{\pi} , \overline{\mu} )\rb\rs
    % =  o_p(1/ \sqrt{nh})
       \PP_n\ls \bs{g}_{ha}(A) K_{ha}(A)
    \lb \wh{\xi}(\bs{Z}; \wh \pi, \wh \mu) -
    \xi(\bs{Z}; \wh{\pi} , \wh{\mu} )\rb\rs
   =  o_p(1/\sqrt{nh}),$$ $$\label{eq:2}
   (\PP_n-\PP)\ls \bs{g}_{ha}(A) K_{ha}(A)
   \lb \xi(\bs{Z}; \wh \pi, \wh \mu) -
   \xi(\bs{Z}; \overline{\pi} , \overline{\mu} )\rb\rs
   =  o_p(1/\sqrt{nh}),
   \text{ and}$$ $$\label{eq:3}
   \PP\ls \bs{g}_{ha}(A) K_{ha}(A)
   \lb \xi(\bs{Z}; \wh \pi, \wh \mu) -
   \xi(\bs{Z}; \overline{\pi} , \overline{\mu} )\rb\rs
   =  O_p(r_ns_n)$$ as $n \to \infty$.

To analyze the term in we use the theory of U- or V-processes, which we introduce next, in Subsection \[sec:v-process-results\]. The V-process results we develop are also important for the proof of Theorem \[thm:null-normality\] below.

U- and V-process results {#sec:v-process-results}
------------------------

Let $f \colon \mc{Z}^r \to \RR$ be permutation symmetric in its arguments. A <span>*U-statistic*</span> based on the 'kernel' $f$, and our i.i.d. sample $W_1, \ldots, W_n \in \mc{Z}$, is ${n \choose r }^{-1} \sum_\beta f(W_{\beta_1}, \ldots, W_{\beta_r})$ where ${n \choose r}$ is the binomial coefficient and the sum is over all combinations of $r$ non-repeated/distinct elements out of $n$ data points [@vanderVaart:1998dr Chapter 12]. The kernel and the U-statistic have degree (sometimes "order") $r$. If instead we sum over all size-$r$-subsets of the $n$ data points, $n^{-r} \sum_{i_1,\ldots,i_r}^n f(W_{i_1}, \ldots, W_{i_r})$ we get a degree $r$ <span>*V-statistic*</span>. U- and V-statistics generally have the same asymptotic distributions. In our present context, we will need to allow $f$ to range over a function class, and so we arise at so-called <span>*U-*</span> or <span>*V-processes.*</span> For us V-processes arise as remainder terms and we wish to show they are asymptotically negligible; we will apply maximal inequalities to do so.

To start, consider an order 2 U-process $$\label{eq:1115}
  U_n(f):= n^{-3/2} \sum_{1 \le i < j \le n} f(W_i,W_j)$$ (with slight laziness in the normalization since we only care about order of magnitude) for $f$ varying over some class $\mc F$ of centered functions, meaning $\PP f(W_1,W_2)=0$. We assume $f(w_1,w_2) = f(w_2,w_1)$. (Note: some of the functions $f$ we need to consider will not be symmetric, but they can and will be symmetrized by considering $f(w_1,w_2) + f(w_2,w_1)$.) A degenerate process is one such that $\PP f(w, W) = 0$ for almost every $w$ (and all $f \in \mc F$). Otherwise the process is non-degenerate. Like U-statistics, U-processes can be decomposed via a Hájek or Hoeffding decomposition into an i.i.d. process and a degenerate U-process. For any $f$, define $(\projf)(w_1,w_2) := f(w_1,w_2) - \PP f(w_1, W_2) - \PP f(W_1,w_2) + \PP f(W_1,W_2)$ (which satisfies $\PP \projf(w,W) =0$). Then $U_n(f) = U_n(\projf  ) + (n-1)n^{-3/2}(\PP_n \otimes \PP)(f)$ where $\PP_n \otimes \PP$ is the product measure of $\PP_n$ (the empirical measure of the $W_i$'s) and $\PP$ on $\mc Z \times \mc Z$.

(Note: for any function $g$ on $\mc W$, $\sum_{1 \le i < j \le n} g(W_i) + g(W_j) = (n-1) \sum_{i=1}^n g(W_i)$.)

We can combine maximal inequalities for i.i.d. empirical processes with a maximal inequality for degenerate U-statistics from @Nolan:jw to yield a maximal inequality for the entire process. This is done in Lemma \[lem:100\] below. The former term generally dominates. We modify the result so it fits the details of our setting. The following result is a form of Theorem 6 of @Nolan:jw for (degenerate) U-processes (combined with Theorem 2.14.1 of @vanderVaart:1996tf). We do not discuss measurability difficulties here. For a class $\mc F$ of symmetric functions (i.e., $f(w_1,w_2) = f(w_2,w_1)$), we let $\PP \mc F$ denote $\{ \PP f(\cdot, W) : f \in \mc F\}$. Recall the definitions of $J(\cdot, \cdot, L_2)$ and $J_2(\cdot, \cdot, L_2)$ given in and .

\[lem:100\] Assume $\mc F$ is a class of (measurable) functions on a (measure) space $\mc W \times \mc W$, with (measurable) envelope $F$. Assume $f\in \mc F$ satisfies $f(w_1,w_2) = f(w_2,w_1)$ and $\PP f(W_1,W_2) = 0$. Assume $W_1, \ldots, W_n$ are i.i.d. and $U_n$ is defined by . Let $F_1(w) $ be an envelope for $\PP \mc F$. Then for a universal constant $C >0$, $$%% \label{eq:1103}
        \PP \| U_n \|_{\mc F} \le C   J_2(1, \mc F, L_2) \sqrt{ \PP F(W_1,W_2)^2 } n^{-1/2}
        +
        C J(1, \PP \mc F, L_2) \sqrt{\PP F_1(W)^2}.$$

In addition to the above result, which applies nicely to order $2$ U-processes, we also rely on maximal inequalities from @Sherman_1994; @Sherman_1994 has slightly less tight results but they apply to U-processes of order higher than $2$. We consider U-processes of order $3$ in Lemma \[lem:4\] below.

The following three lemmas provide the negligibility of remainder terms in the analysis of our test statistic limit distribution. They are all in V-statistic form (if one regards $\wh \pi,\wh\mu$ as fixed) and thus their analysis (allowing $\wh \pi, \wh \mu $ to vary) requires the theory of V-processes. Also, Lemma \[lem:1\] above relies on Lemma \[lem:100\].

\[lem:3\] Let the assumptions of Theorem \[thm:null-normality\] hold. Then $$\label{eq:102}
    \PP_n\lb\widehat{\xi}(\bs{Z};\widehat{\pi},\widehat{\mu}) -
    \xi(\bs{Z};\widehat{\pi},\widehat{\mu})\rb
    = O_p(n^{-1/2}) 
    \text{ as } n \to \infty.$$

\[lem:5\] Let the assumptions of Theorem \[thm:null-normality\] hold. Let $$d_{1,1}(a) :=g_{ha}^T \widehat {\bs D}_{ha}^{-1} \PP_n \ls g_{ha}(A) K_{ha}(A)
    \lb  \wh \xi( \bs Z; \wh \pi, \wh \mu ) - \xi(\bs Z; \widehat{\pi},
    \widehat{\mu}) \rb \rs .$$ Then $n \sqrt{h} \int (d_{1,1}(a))^2 w(a) da = O_p(\sqrt{h}) = o_p(1)$ as $n \to \infty$.

The V-statistic terms analyzed in the next lemma arise from certain cross product error terms. We let tilde $ \wt{ \cdot } $ operate on any $\mu, \pi$ to yield $\wt{\pi}(a_1|l_2) := \pi(a_1|l_2) - \PP \pi(a_1| \bs L)$ and similarly $\wt\mu(l_2,a_1) := \mu(l_2,a_1) - \PP \mu(\bs L,a_1)$. Let $\overline{\epsilon}:=\xi(\bs{Z};\overline{\pi},\overline{\mu})-\PP\xi(\bs{Z};\overline{\pi},\overline{\mu})$, and specifically $\overline{\epsilon}_i:=\xi(\bs{Z}_i;\overline{\pi},\overline{\mu})-\PP\xi(\bs{Z};\overline{\pi},\overline{\mu})$ for $i=1,\ldots, n$.

\[lem:4\] Let the assumptions of Theorem \[thm:null-normality\] hold. Let $$V_{12,\mu} :=
    \inv{n^3} \sum_{i,j,k=1}^n
    \int_{\mc A}
    \varpi_0(a)^{-2} 
    \ls  K_{ha}(A_i) \wt \mu (\bs L_j , A_i)  K_{ha}(A_k) \overline \epsilon_k \rs
    w(a)
    da, \label{eq:3V-term-defn-mu} \\$$ $$\label{eq:3V-term-defn-pi}
    \begin{split}
      \MoveEqLeft
      V_{12, \pi} := 
      \inv{n^3} \sum_{i,j,k=1}^n
      \int_{\mc A}
      \varpi_0(a)^{-2} \times \\
      &      \ls  K_{ha}(A_i)
      \lp  \frac{Y_i - \mu(\bs L_i, A_i)}{\pi(A_i | \bs L_i) } \wt \pi(A_i | \bs L_j) \rp
      K_{ha}(A_k) \overline \epsilon_k \rs
      w(a) da, 
    \end{split}$$ Then $V_{12,\wh \mu}$ and $V_{12, \wh \pi}$ are $O_p(n^{-2}h^{-3/2})$ as $n \to \infty$.

Asymptotic properties of the test
---------------------------------

Now we present the asymptotic distribution of our test statistic $T_n$ under the null hypothesis. To metrize weak convergence, we use the Dudley metric [Chapter 14, Section 2, @shorack2000probability], which is defined as $$\begin{aligned}
  d(X,Y) := \sup\lb\int g\,dF-\int g\,dG:\|g\|_{BL}\le 1\rb,\end{aligned}$$ where $X$ and $Y$ are random variables with distribution functions $F$, $G$, respectively, and where $$\|g\|_{BL}:= \sup_{x\in \RR}|g(x)|+ \sup_{x\ne y}\frac{|g(x)-g(y)|}{|x-y|}.$$ For a kernel function $K$, we use $K^{(s)}$ to denote the $s$-times convolution product of $K$, that is $$\begin{aligned}
  K^{(s)}(x) = \int K^{(s-1)}(y)K(x-y)\,dy,\end{aligned}$$ with $K^{(0)}=K$. And we let $K^{(s)}_h(x):= K^{(s)}(x/h)$. Let $$\begin{aligned}
  \label{eq:condition-var}    \sigma^2(a)=\EE\ls\frac{\tau(\bs{L},a)+\{\mu_0(\bs{L},a)-\bar{\mu}(\bs{L},a)\}^2}{\{\bar{\pi}(a|\bs{L})/\bar{\varpi}(a)\}^2/\{\pi_0(a|\bs{L})/\varpi_0(a)\}}\rs
  -\lb\theta_0(a)-\bar{m}(a))\rb^2,\end{aligned}$$ where $\bar{\varpi}(a):=\int\bar{\pi}(a|\bs{l})\,dP(\bs{l})$ and $\bar{m}(a):=\int\{\bar{\mu}(\bs{l},a)\,dP(\bs{l})$.

We can now state our main theorem, which gives the limit distribution of our test statistic under the null hypothesis.

\[thm:null-normality\] Let Assumptions \[assm:IA\]\[assm:IA-item1\]–\[assm:IA\]\[assm:IA-item3\], \[assm:DA\]\[assm:DA-item1\]–\[assm:DA\]\[assm:DA-item4\], \[assm:EA\]\[assm:EA-item3\]–\[assm:EA\]\[assm:EA-item5\] hold and let $w(\cdot)$ be a continuously differentiable weight function on $\mc A$. Let $\sigma^2(\cdot)$ and $T_n$ be as given in and . Then under $H_0$ (from ), we have $$\begin{aligned}
    \label{eq:null-limit-dist}
    d\lb T_n,N(b_{0h},V)\rb\to 0
  \end{aligned}$$ as $n\to \infty$, where $$\begin{aligned}
    b_{0h}&=h^{-1/2}K^{(2)}(0)\int_{\mc{A}}\frac{\sigma^2(a)w(a)}{\varpi_0(a)}\,da,\\
    V&=2K^{(4)}(0)\int_{\mc{A}}\ls\frac{\sigma^2(a)w(a)}{\varpi_0(a)}\rs\,da.
  \end{aligned}$$

The proof is given in the Appendix.

Next we state the consistency of our test under alternatives as follows. (The $\delta_n$ sequence can in particular be $(n \sqrt{h})^{1/2}$.)

\[thm:alternative\] Let the assumptions of Theorem \[thm:null-normality\] hold. Then under the alternative $\theta_0(a)=c_0+\delta_n(n\sqrt{h})^{-1/2}g(a)$, where $c_0=\PP\xi(\bs{Z};\pi_0,\mu_0)$, $\delta_n$ is any sequence converging to $\infty$ and $g(a)$ satisfies $g(a)\ne 0$ and the integral $\int
  g(a)\varpi(a)w(a)\,da=0$, we have $$\begin{aligned}
    P(T_n>t^{\ast}_{n,1-\alpha})\to 1
  \end{aligned}$$ as $n\to \infty$, where we use $t_{n,1-\alpha}^{\ast}$ to denote the upper $\alpha$ quantile of the Normal distribution in .

The proof is given in the Appendix.

Extension for testing for a treatment effect modifier {#sec:extens-test-finite}
=====================================================

In this section, we briefly introduce an extension of our proposed test to a scenario where we are interested in testing whether a covariate is a treatment effect modifier or not, meaning the causal treatment effect is different conditional on the covariate value than it is unconditionally. The following provides a mapping or pseudo-outcome that has the double robustness property for assessing treatment effect modifiers.

\[thm:conditional-dr-mapping\] Let Assumption \[assm:IA\] hold. Then the following mapping $$\begin{aligned}
    \label{eq:conditional-dr-mapping} 
    \phi(\bs{Z};\pi,\mu) = \frac{Y-\mu(\bs{L},A)}{\pi(A|\bs{L})}
    \int_{\mc{A}}\pi(A|\bs{l})\,dP(\bs{l}|L_p)
    +\int_{\mc{A}}\mu(\bs{l},A)\,dP(\bs{l}|L_p)
  \end{aligned}$$ satisfies $\EE\{ \phi(\bs{Z};\pi,\mu)|A=a,L_p=l_p\}=\EE\{Y^a|L_p=l_p\}$ if either $\pi=\pi_0$ or $\mu=\mu_0$.

In real data analysis, we need to estimate the unknown aspects of , so we arrive at $$\label{eq:estimated-conditional-dr-mapping} 
    \wh \phi(\bs{Z};\wh\pi,\wh\mu) = \frac{Y-\wh\mu(\bs{L},A)}{\wh\pi(A|\bs{L})}\int_{\mc{A}}\wh\pi(A|\bs{l})\,d\PP_n(\bs{l}_{}|L_p)+\int_{\mc{A}}\wh\mu(\bs{l},A)\,d\PP_n(\bs{l}_{}|L_p)$$ Once we have esimated the pseudo-outcome, we can use develop methodology analogous to the methodology we developed for testing $\theta_0(\cdot)$ above, based on $\{ (A_i, L_{i,p}, \wh{\phi}(\bs{Z}_i, \wh \pi, \wh \mu)\}_{i=1}^n$.

In this manuscript we focus on the case of discrete variables that are treatment effect modifiers, in which case it is straightforward to extend the methodology from Subsection \[sec:proposed-method\]. @dette2001nonparametric proposed three test statistics based on Nadaraya-Watson estimators of the regression functions to test equality of regression functions. Specifically, one of the three test statistics they proposed has a similar form as our statistic $T_n$ above, and can be written as $$\begin{aligned}
  \label{eq:dette-test-stat3}
  %% T_N^{(3)} =
  \sum^{k}_{m=2}\sum_{j=1}^{m-1}\int_{\mc{A}}\lb\hat g_m(a)-\hat g_j(a)\rb^2
  w_{m,j}(a)\,da,\end{aligned}$$ where $w_{m,j}$ are (positive, user-chosen) weight functions satisfying $w_{m,j}=w_{j,m}$, there are $k$ groups (i.e., values of the discrete variable), and $\hat g_j$, $j=1,\ldots,k$, is the Nadaraya-Watson estimator for the $j$-th group regression function. All the three test statistics of @dette2001nonparametric share the same convergence rates as in @Hardle:1993ih (or @alcala1999goodness) (and thus, of our proposed test above). @dette2001nonparametric also used the wild bootstrap to estimate the distribution of the test statistics. Combining the conditional doubly robust mapping with , we consider the following test statistic for testing whether a discrete covariate with a finite number, $k$, of possible values is an effect modifier or not: $$\begin{aligned}
  \label{eq:condition-test-stat}
  T^p_n = \sum_{m=2}^k\sum_{j=1}^{m-1}\int_{\mc{A}}\lb\wh\theta_{h,m}(a)-\wh\theta_{h,j}(a)\rb^2w_{ij}(a)\,da,\end{aligned}$$ where $\wh\theta_{h,j}(a)$ is the local linear estimator applied to the subset of the tuples $\{(\wh\phi(\bs{Z}_i;\wh\pi,\wh\mu), A_i)\}$ with the $p$-th covariate $L_{i,p}$ taking the $j$-th category. We summarize this extended testing procedure as follows.

1.  Estimate the nuisance functions $(\pi_0, \mu_0)$ with $(\wh\pi,\wh\mu)$.

2.  Calculate the pseudo-outcomes $\wh\phi(\bs{Z};\wh\pi,\wh\mu)$ according to and construct the local linear estimator $\wh\theta_{h,j}(a)$ for each conditional treatment effect curve with the corresponding subset of $\{(\wh\phi(\bs{Z}_i;\wh\pi,\wh\mu), A_i)\}$.

3.  Calculate the test statistic $T_n^p$ according to .

4.  To estimate the critical value of the asymptotic distribution under the null,

    1.  Use the pooled data $\{(\wh\phi(\bs{Z}_i;\wh\pi,\wh\mu),
            A_i)\}_{i=1}^n$ to construct a single local linear estimator $\wh\theta_h(a)$

    2.  Calculate $ \wh\theta_h(A_i)$ and $\wh\epsilon_i =
            \wh\phi(\bs{Z}_i;\wh\pi,\wh\mu)- \wh\theta_h(A_i) $. Generate the bootstrap sample of residuals $\wh\epsilon^{\ast}_i\sim\hat{F}_i$ and response $
            \wh\phi^{\ast}_i= \wh\theta_h(A_i)+\wh\epsilon^{\ast}_i$, where choices of $\hat{F}_i$ are the same as discussed in Section \[sec:proposed-method\].

    3.  Calculate $T_n^{p\ast}$ using the bootstrap sample $\{(A_i,L_{i,p},\wh\phi_i^{\ast})\}_{i=1}^n$.

    4.  Repeat (2) and (3) for $B$ times, where $B$ is the desired number of bootstrap samples; We estimate critical value of rejection by $\hat{t}_{n,1-\alpha}^{p\ast}$, the $1-\alpha$ sample quantile of $T_n^{p\ast}$ from the bootstrap samples.

5.  Reject the null hypothesis if $T_n^p>\hat{t}_{n,1-\alpha}^{p\ast}$.

We use simulation to show the validity of this extended procedure in Section \[sec:simulation\].

Simulation studies {#sec:simulation}
==================

Simulation for testing constant average treatment effect
--------------------------------------------------------

We use simulation to assess the performance of our proposed test in terms of both type I error probability and power. We consider two data generating models, one with binary reponse and which is defined similarly as in @Kennedy:2017cq, and another one with continuous response. In more detail, they are specified as follows. In Model 1, We simulate the covariates from the standard normal distribution as $\bs{L}=(L_1,\ldots,L_4)^T\sim N(0,\bs{I}_4)$ and and simulate the treatment level from Beta distributions, $$\begin{aligned}
  &(A/20)|\bs{L}\sim \text{Beta}(\lambda(\bs{L}),1-\lambda(\bs{L})),\\
  &\text{logit } \lambda(\bs{L})=-0.8+0.1L_1+0.1L_2-0.1L_3+0.2L_4,\end{aligned}$$ and finally the binary outcome is simulated as $Y|\bs{L},A\sim
\text{Bernoulli}(\mu(\bs{L},A))$, where $ \text{logit}\mu(\bs{L},A)=1+(0.2,0.2,0.3,-0.1)\bs{L}
+\delta A(0.1-0.1L_1+0.1L_3-0.13^2A^2)$.

In Model 2, the covariates are simulated in a similar way as in Model 1. We simulate the treatment level from Beta distributions, $$\begin{aligned}
    &(A/5)|\bs{L}\sim \text{Beta}(\lambda(\bs{L}),1-\lambda(\bs{L})),\\
    &\text{logit } \lambda(\bs{L})=0.1L_1+0.1L_2-0.1L_3+0.2L_4,
     \end{aligned}$$ and we simulate the continuous response from conditional normal distributions as $Y|\bs{L},A\sim N(\mu(\bs{L},A),0.5^2)$, where $$\begin{aligned}
    \mu(\bs{L},A)=&(0.2,0.2,0.3,-0.1)\bs{L}+A(-0.1L_1+0.1L_3)\\
    % &\qquad\qquad\quad
    & +\delta\exp\lb-\frac{(A-2.5)^2}{(1/2)^2}\rb.
  \end{aligned}$$ In both models, we have a parameter $\delta$ which controls the distance between the true treatment effect model and the null hypothesis, i.e., treatment effect is constant, with $\delta=0$ indicating no treatment effect in both models. Moreover, $\delta=0$ in Model 1 suggests a constant average treatment effect and is similar to the weak null used in @westling2020nonparametric; $\delta=0$ in Model 2 suggests all conditional average treatment effects are constant and is similar to the strong null. Specifically, for Model 1, we let $\delta\in\{0,0.002,0.004,0.006,0.008,0.01\}$, and we let $\delta\in\{0,0.1,0.2,0.3,0,4,0.5\}$ for Model 2. We plot the treatment effect curve with $\delta=0.01$ for Model 1 and the treatment effect curve with $\delta=0.5$ for Model 2 in Figure \[fig:simulation-treatment-curve\].

![Treatment effect curves in Model 1 and Model 2. Left: Model 1 with $\delta=0.01$. Right: Model 2 with $\delta=0.5$.<span data-label="fig:simulation-treatment-curve"></span>](Fig/treatment_curve.pdf){width="80.00000%"}

For each data generating model, we test the performance of our method under 4 scenarios: (1) $\pi$ is correctly specified with a parametric model, $\mu$ is incorrectly specified with a parametric model; (2) $\pi$ is incorrectly specified with a parametric model, $\mu$ is correctly specified with a parametric model; (3) both $\pi$ and $\mu$ are correctly specified with a parametric model; (4) both $\pi$ and $\mu$ are estimated with Super Learners [@van2007super]. In the first two scenarios, the incorrect parametric models are constructed in the same way as in @kang2007demystifying. The first three scenarios are used to test double robustness of our method and last one to show the empirical performance of our method when we use flexible machine learning models to estimate the nuisance functions. After we calculate the pseudo-outcomes, we use the rule of thumb for bandwidth selection [@Fan:1996tk] for the local linear estimator. We compare the performance of our method with @westling2020nonparametric in the first three scenarios; with @westling2020nonparametric and a discretized version of TMLE [@JSSv051i13] with treatment dichotomized at the middle point in the last scenario. In our method, we choose the weight function $w(a)\equiv 1$. We implemented all three versions ($L_1,L_2$ and $L_{\infty}$) of methods in @westling2020nonparametric for comparison. Rejection probabilities are estimated with 1000 independent replications of simulation. Finally, we consider sample sizes in $\{500,1000,2000\}$.

Figures \[fig:model1-parametric\] and \[fig:model1-nonparametric\] in @drtest-supp show the results for Model 1. We can see when at least one of the nuisance functions is correctly estimated, our method and Westling's methods performed similarly in terms of both type I error probability and power. When both nuisance functions are estimated with Super Learners, Westling's methods have slightly larger power than our method but also have slightly larger type I error probabilities. Note that in this case, the discretized version of TMLE outperformed both our method and Westling's method in terms of type I error probability and power. The reason may be the shape of the treatment effect curve in Model 1 is somewhat simple and monotone, and there isn't much information loss if we dichotomize the continuous treatment to form a simpler testing problem. We also note that apparently @westling2020nonparametric's method is doubly robust on the specific data generating model we use here.

Figures \[fig:model2-parametric\] and \[fig:model2-nonparametric\] shows the results for Model 2 where we have a slightly complicated and non-monotone treatment effect curve as in Figure \[fig:simulation-treatment-curve\]. We can see in the first three scenarios, our methods outperformed Westling's methods in terms of power in all cases. Our method does better even with a small sample size and a weak deviation from the null model, compared with Westling's method. Similar observation holds when we use Super Learner to estimate both nuisance functions. Another observation worth noting is that, in this data model, the discretized TMLE failed to detect any deviation from the null model since the treatment effect curve is symmetric, which provides an example when discretizing a continuous treatment and applying a binary test may lead to a completely wrong conclusion.

![Simulation result for Model 2 with $\pi$ and $\mu$ estimated from parametric models.<span data-label="fig:model2-parametric"></span>](Fig/normal_parametric_rejprob.pdf){width="95.00000%"}

![Simulation result for Model 2 with $\pi$ and $\mu$ estimated from nonparametric models.<span data-label="fig:model2-nonparametric"></span>](Fig/normal_np_rejprob.pdf){width="95.00000%"}

Simulation for testing treatment effect modifier
------------------------------------------------

We consider the problem of testing for a treatment effect modified now. We consider the following data generating process with a continuous outcome, which is similar to Model 2 above, to perform the simulations. First, we let $$\begin{aligned}
  %% \bs{W}=(W_1,\ldots, W_4)^T\sim N(0,\bs{I}_4).
  \wt{\bs{L}}=(L_1, L_2, L_3, \wt L_4)^T\sim N(0,\bs{I}_4).\end{aligned}$$ And let $L_4 = \mathbbm{1}\{ \wt L_4>1\}$ and suppose we observe $\bs{L}=(L_1,L_2,L_3, L_4)^T$. Then we simulate the treatment level from Beta distributions, $$\begin{aligned}
  (A/5)|\bs{L}&\sim \text{Beta}(\lambda(\bs{L}),1-\lambda(\bs{L})),\\
  \text{logit } \lambda(\bs{L})&=0.1L_1+0.1L_2-0.1L_3+0.2L_4,\end{aligned}$$ and we simulate the continuous response from a normal distribution, $$\begin{aligned}
  Y|\bs{L},A&\sim N(\mu(\bs{L},A),0.5^2),\\
  \mu(\bs{L},A)&=0.2L_1+0.2L_2+0.3L_3-0.1\delta L_4 -0.1AL_1+0.1\delta AL_4\\
  &\quad+\exp\lb\frac{(A-2.5)^2}{(1/2)^2}\rb.\end{aligned}$$ So we see that the parameter $\delta$ controls the distance between the conditional treatments when $L_4=1$ and when $L_4=0$, and when $\delta=0$, there is no difference between the two conditional treatment effect curves, i.e., $L_4$ is not an effect modifier. In the simulation, we let $\delta$ take values in $\{0,0.1,0.2,0.3,0.4,0.5\}$. And similar to Section \[sec:simulation\], we test the performance of this treatment modifier test under 4 scenarios: (1) $\pi$ is correctly specified with a parametric model, $\mu$ is incorrectly specified with a parametric model; (2) $\pi$ is incorrectly specified with a parametric model, $\mu$ is correctly specified with a parametric model; (3) both $\pi$ and $\mu$ are correctly specified with a parametric model; (4) both $\pi$ and $\mu$ are estimated with Super Learners [@van2007super].

We display the simulation results in Figures \[fig:effect-modifier-parametric\] and \[fig:effect-modifier-nonparametric\] in @drtest-supp. In Figures \[fig:effect-modifier-parametric\], we see that when at least one of the nuisance functions are correctly estimated, we have type I error probability converges to the nominal significance level $\alpha=0.05$ and rejection probability converging to 1 as we increase the sample size. So this suggests the extended test maintains double robustness as we expected. In Figures \[fig:effect-modifier-nonparametric\], with the nonparamtric Super Learner, we also see type I error probability converges to the nominal signifcance level $\alpha=0.05$ and rejection probability converging to 1 as we increase the sample size.

Real data analysis {#sec:real-analysis}
==================

Discussion and extensions {#sec:disc-extens}
=========================

Acknowledgements {#acknowledgements .unnumbered}
================

The second author is partially supported by NSF grant DMS-1712664 and NSF grant DMS-1712706.

{'source': 'arXiv_out/2202'}