There is growing interest in estimating and analyzing heterogeneous treatment effects in experimental and observational studies. We describe a number of metaalgorithms that can take advantage of any supervised learning or regression method in machine learning and statistics to estimate the Conditional Average Treatment Effect (CATE) function. Meta-algorithms build on base algorithms-such as Random Forests (RF), Bayesian Additive Regression Trees (BART) or neural networksto estimate the CATE, a function that the base algorithms are not designed to estimate directly. We introduce a new meta-algorithm, the X-learner, that is provably efficient when the number of units in one treatment group is much larger than in another, and it can exploit structural properties of the CATE function. For example, if the CATE function is linear and the response functions in treatment and control are Lipschitz continuous, the X-learner can still achieve the parametric rate under regularity conditions. We then introduce versions of the X-learner that use RF and BART as base learners. In extensive simulation studies, the X-learner performs favorably, although none of the meta-learners is uniformly the best. In two persuasion field experiments from political science, we demonstrate how our new X-learner can be used to target treatment regimes and to shed light on underlying mechanisms. A software package is provided that implements our methods. With the rise of large data sets containing fine-grained information about humans and their behavior, researchers, businesses, and policymakers are increasingly interested in how treatment effects vary across individuals and contexts. They wish to go beyond the information provided by estimating the Average Treatment Effect (ATE) in randomized experiments and observational studies. Instead, they often seek to estimate Conditional Average Treatment Effects (CATE) to personalize treatment regimes and to better understand causal mechanisms. We introduce a new estimator called the X-learner, and we characterize it and many CATE estimators into a unified meta-learner framework. Their performance is compared using extensive simulations, theory, and two data sets from randomized field experiments in political science. In the first randomized experiment, we estimate the effect of a mailer on voter turnout (1), and in the second, we measure the effect of door-to-door conversations on prejudice against gender nonconforming individuals (2). In both experiments, the treatment effect is found to be non-constant, and we quantify this heterogeneity by estimating the CATE. We obtain insights into the underlying mechanisms, and the results allow researchers to better target the treatment. To estimate the CATE, we build on regression or supervised learning methods in statistics and machine learning, which are widely used and successful in a wide range of applications. Specifically, we study meta-algorithms or meta-leaners for estimating the CATE. They decomposed estimating the CATE into several sub-regression problems that can be solved with any regression or supervised learning method. The most common meta-algorithm for estimating heterogeneous treatment effects takes two steps. First, it uses so-called base learners to estimate the conditional expectations of the outcomes given predictors under control and treatment separately. Second, it takes the difference between these estimates. This approach has been analyzed when the base learners are linear regression (3) or tree-based methods (4). When used with trees, this has been called the Two-Tree estimator and we will, there-1 arXiv:1706.03461v4 [math.ST]  fore, refer to the general idea of estimating the response functions separately as the T-learner, "T" should be understood to stand for "two." Closely related to the T-learner is the idea of estimating the outcome using all of the features and the treatment indicator, without giving the treatment indicator a special role. The predicted CATE for an individual unit is then the difference between the predicted values when the treatment assignment indicator is changed from control to treatment, with all other features held fixed. This meta-algorithm has been studied with BART (5, 6) and regression trees (4) as the base learners. We refer to this meta-algorithm as the S-learner, since it uses a Single estimator. There are also estimators for the CATE which do not fall in the class of meta-algorithms. One example is causal forests (7). Since causal forests is a RF based estimator, we compare it to meta-learners with RF in simulation studies. We will see that causal forests and the metalearners perform comparably well when used with RF, but the meta-learners can significantly outperform causal forests with other base learners. The main contribution of this paper is the introduction of a new meta-algorithm: the X-learner, which builds on the T-learner and uses each observation in the training set in an "X"-like shape. Suppose we could observe the individual treatment effects directly. We could then estimate the CATE function by regressing the difference of individual treatment effects on the covariates. Structural knowledge about the CATE function (e.g., linearity, sparsity or smoothness) could be taken into account by either picking a particular regression estimator for CATE or using an adaptive estimator that could learn these structural features. Obviously, we do not observe individual treatment effects because we only observe the outcome under control or treatment, but never both. The Xlearner uses the observed outcomes to estimate the unobserved individual treatment effects. It then estimates the CATE function in a second step as if the individual treatment effects were observed. The X-learner has two key advantages over other estimators of the CATE. First, it can provably adapt to structural properties such as sparsity or smoothness of the CATE. This is particularly useful since the CATE is often zero or approximately linear (8, 9). Secondly, it is particularly effective when the number of units in one treatment group (usually the control group) is much larger than in the other. This occurs because (control) outcomes and covariates are easy to obtain using data collected by administrative agencies, electronic medical record systems or online platforms. This is, for example, the case in our first data example where election turnout decisions in the U.S. are recorded by local election administrators for all registered individuals. The rest of the paper is organized as follows. We start with a formal introduction of the meta-learners and provide intuitions for why we can expect the X-learner to perform well when the CATE is smoother than the response outcome functions and when the sample sizes between treatment and control are unequal. We then present the results of an extensive simulation study and provide advice for practitioners before we present theoretical results on the convergence rate for different metalearners. Finally, we examine two field experiments using several meta-algorithms and illustrate how the X-learner can find useful heterogeneity with fewer observations. We employ the Neyman-Rubin potential outcome framework (10, 11), and assume a super population or distribution P from which a realizations of N independent random variables are given as the training data. That is, ( , 1} is the treatment assignment indicator (to be defined precisely later), Y i (0) ∈ R is the potential outcome of unit i when i is assigned to the control group, and Y i (1) is the potential outcome when i is assigned to the treatment group. With this definition, the Average Treatment Effect is defined as It is also useful to define the response under control, µ 0 , and the response under treatment, µ 1 , as Furthermore, we use the following representation of P: where Λ is the marginal distribution of X, ε(0) and ε(1) are noise random variables with mean zero conditioning on X, and e(x) = P(W = 1|X = x) is the propensity score. The fundamental problem of causal inference is that for each unit in the training dataset, we either observe the potential outcome under control (W i = 0), or the potential outcome under treatment (W i = 1), but never both. Hence we denote the observed data as Note that the distribution of D is specified by P. To avoid the problem that with a small 2 but non-zero probability all units are under control or under treatment, we will analyze the behavior of different estimators conditional on the number of treated units. That is, for a fixed n with 0 < n < N , we condition on the event that This will enable us to state the performance of an estimator in terms of the number of treated units n and the number of control units m = N − n. For a new unit i with covariate vector x i , in order to decide whether to give the unit the treatment, we wish to estimate the Individual Treatment Effect (ITE) of unit i, D i , which is defined as However, we do not observe D i for any unit, and D i is not identifiable without strong additional assumptions because one can construct data generating processes with the same distribution of the observed data, but different D i (Example 3). Instead, we will estimate the CATE function which is defined as and we note that the best estimator for the CATE is also the best estimator for the ITE in terms of the MSE. To see that, letτ i be an estimator for D i and decompose the MSE at x i as Since we cannot influence the first term in the last expression, the estimator which minimizes the MSE for the ITE of i also minimizes the MSE for the CATE at x i . In this paper, we are interested in estimators with a small Expected Mean Squared Error (EMSE) for estimating the CATE, The expectation is here taken overτ and X ∼ Λ which is independent ofτ and has the same distribution of the features X. To aid our ability to estimate τ , we need to assume that there are no hidden confounders (12): This assumption is, however, not sufficient to identify the CATE. One additional assumption that is often made to obtain identifiability of the CATE in the support of X is to assume that the propensity score is bounded away from 0 and 1, Condition 2 There exists e min and e max such that for all x in the support of X, 0 < e min < e(x) < e max < 1. In this section, we formally define a meta-algorithm (or meta-learner) for the CATE as the result of combining supervised learning or regression estimators (i.e., base learners) in a specific manner while allowing the base learners to take on any form. Meta-algorithms thus have the flexibility to appropriately leverage different sources of prior information in separate sub-problems of the CATE estimation problem: they can be chosen to fit a particular type of data, and they can directly take advantage of existing data analysis pipelines. We first review both T and S learners, and we then propose the X-learner, which is a new meta-algorithm that can take advantage of unbalanced designs (i.e., the control or the treated group is much larger than the other group) and existing structures of the CATE (e.g., smoothness or sparsity). Obviously, flexibility is a gain only if the base learners in the meta-algorithm match the features of the data and the underlying model well. The T-learner takes two steps. First, the control response function, is estimated by a base learner, which could be any supervised learning or regression estimator using the observations in the control group, {(X i , Y i )} Wi=0 . We denote the estimated function asμ 0 . Second, we estimate the treatment response function, with potentially a different base learner using the treated observations and we denote the estimator asμ 1 . A Tlearner is then obtained aŝ Pseudo code for this T-learner can be found in Algorithm 1. In the S-learner, the treatment indicator is included as a feature similar to all the other features without the 3 indicator being given any special role. We thus estimate the combined response function, using any base learner (supervised machine learning or regression algorithm) on the entire data set. We denote the estimator asμ. The CATE estimator is then given byτ and pseudocode is provided in Algorithm 2. There are other meta-algorithms in the literature, but we do not discuss them here in detail because of limited space. For example, one may transform the outcomes so that any regression method can estimate the CATE directly (Algorithm 4) (4, 13, 14). In our simulations, this algorithm performs poorly, and we do not discuss it further, but it may do well in other settings. We propose the X-learner, and provide an illustrative example to highlight its motivations. The basic idea of the X-learner can be described in three stages: 1. Estimate the response functions using any supervised learning or regression algorithm and denote the estimated functionsμ 0 andμ 1 . The algorithms used are referred to as the base learners for the first stage. 2. Impute the treatment effects for the individuals in the treated group based on the control outcome estimator, and the treatment effects for individuals in the control group based on the treatment outcome estimator, that is: and call these the imputed treatment effects. We can employ any supervised learning or regression method(s) to estimate τ (x) in two ways: using the imputed treatment effects as the response variable in the treatment group to obtainτ 1 (x), and similarly to obtainτ 0 (x) for the control group. Call the supervised learning or regression algorithms base learners of the second stage. 3. Define the CATE estimate by a weighted average of the two estimates in Stage 2: where g ∈ [0, 1] is a weight function. See Algorithm 3 for pseudo code. Remark 1τ 0 andτ 1 are both estimators for τ . While g is chosen to combine these estimators to one improved estimatorτ . Some good choices of g involve choosing g to be an estimator of the propensity score, g =ê, but it can also make sense to choose g = 1 or 0 if the number of treated units is very large or small compared to the number of control units. For some estimators, it might even be possible to estimate the covariance matrix ofτ 1 andτ 0 . One may then wish to choose g to minimize the variance ofτ . The X-learner can use information from the control group to derive better estimators for the treatment group and vice versa. We will illustrate this using a simple example. Suppose we want to study a treatment, and we are interested in estimating the CATE as a function of one covariate x. We observe, however, very few treated units and many units in the control group. This situation often arises with the growth of administrative and on-line data sources: data on control units is often far more plentiful than for treated units. Figure 1 (a) shows the outcome for units in the treatment group (circles) and the outcome of the untreated (crosses). In this example, the CATE is constant and equal to one. For the moment, let us only look at the treated outcome. When we estimate µ 1 (x) = E[Y (1)|X = x], we must be careful not to overfit the data since we only observe 10 data points. We might decide to use a linear model,μ 1 (x) (dashed line), to estimate µ 1 . For the control group, we notice observations with x ∈ [0, 0.5] seem to be different, and we end up modeling µ 0 (x) = E[Y (0)|X = x] with a piecewise linear function with jumps at 0 and 0.5 (solid line). This is a relatively complex function, but we are not worried about overfitting since we observe many data points. The T-learner would now use estimatorτ T (x) = µ 1 (x) −μ 0 (x) (see Figure 1 (c) solid line), which is a relatively complicated function with jumps at 0 and 0.5, while the true τ (x) is a constant. This is, however, problematic because we are estimating a complex CATE function based on ten observations in the treated group. When choosing an estimator for the treatment group, we correctly avoided overfitting, and we found a good estimator for the treatment response function, but as a result, we chose a relatively complex estimator for the CATE-the quantity of interest. We should have selected a piecewise linear function with jumps at 0 and 0.5, but this is, of course, unreasonable when just looking at the treated group. If we were to also take the control group into account, this function may be a natural choice. In other words, we should change our objective forμ 1 and µ 0 . We want to estimateμ 1 andμ 0 in such a way that their difference is a good estimator for τ . The X-learner enables us to do exactly that. It allows us to use structural information about the CATE and to make efficient use of an unbalanced design. The first stage of the X-learner is the same as the first stage of the T-learner, but in its second stage, the estimator for the controls is subtracted from the observed treated outcomes and similarly the observed control outcomes are subtracted from estimated treatment outcomes to obtain the imputed treatment effects, Here we use the notation that Y  we effectively estimate a model for , which has a similar shape toμ 0 . We can see that by choosing a relatively poor model for µ 1 (x),D 0 is relatively far away from τ (x). The model for will thus be relatively poor. However, our final estimator combines these two estimators according tô If we choose g(x) =ê(x), an estimator for the propensity score,τ will be very similar toτ 1 (x), since we have many more observations in the control group-i.e.,ê(x) is small. Figure 1(c) shows the T-learner and the X-learner. It is difficult to assess the general behavior of the Slearner in this examples because we must choose a base learner. For example, when we use RF as the base learner for this data set, the S-learner's first split is on the treatment indicator in 97.5% of all trees in our simulations because the treatment assignment is very predictive of the observed outcome, Y (also see Figure 11 ). From there on, the S-learner and T-learner are the same, and we observe them to perform similarly poorly in this example. We conduct an extensive simulation study to compare the different meta-learners, and in this section, we summarize our findings and provide general remarks on the strengths and weaknesses of the S, T, and X learners while leaving details to the SI. The simulations are key to providing an understanding of the performance of the methods we consider for model classes that are not covered by our theoretical results. Our simulation study is designed to consider a range of situations, making sure to include conditions where we think that the S-learner or the T-learner are likely to perform the best, and we include simulations setups proposed by previous researchers (7). We consider cases where the treatment effect is zero for all units and so pooling treatment and control groups is advantageous, and cases where the treatment and control response functions are completely different and so pooling would be harmful. We consider cases with and without confounding, and cases with equal and unequal sample sizes across treatment conditions. All simulations discussed in this section are based on synthetic data. For details, please see Section A. We provide additional simulations based on actual data when we discuss our applications. We compare the S, T, and X learners with RF and BART as base learners. We implemented a version of RF for which the tree structure is independent of the leaf prediction given the observed features, so called honest RF in an R package called hte (15). This version of RF is particularly accessible from a theoretical point of view, it performs well in noisy settings, and it is better suited for inference (7, 16). For BART, our software uses the dbarts (17) implementation for the base learner. Comparing the use of different base learners enables us to demonstrate two things. On the one hand, it shows 5 that the conclusions we draw about the S, T and X learner are not specific to a particular base learner and on the other hand, it demonstrate that the choice of base learners can make a large difference in the prediciton accuracy. The latter is an important advantage of meta-learners since subject knowledge can be used to choose base learners that perform well. For example, in Simulations 2 and 4 the response functions are globally linear, and we observe that estimators which act globally such as BART have a significant advantage in these situations or when the data set is small. If, however, there is no global structure or when the data set is large, then more local estimators such as RF seem to have an advantage (Simulations 3 and 5). We observe that the choice of meta-learner can make a large difference, and for each meta-learner there exist cases where it is the best performing estimator. The S-learner is treating the treatment indicator like any other predictor. For some base learners such as knearest neighbors it is not a sensible estimator, but for others, it can perform well. Since the treatment indicator is given no special role, algorithms such as the lasso and regression trees can completely ignore the treatment assignment by not choosing/splitting on it. This is excellent if the CATE is in many places 0 (Simulations 4 and 5), but-as we will see in our second data example-the S-learner can be biased towards 0. The T-learner, on the other hand, does not combine the treated and control groups. This can be a disadvantage when the treatment effect is simple because by not pooling the data, it is more difficult to learn a behavior which appears in both the control and treatment response functions (e.g., Simulation 4). If, however, the treatment effect is very complicated, and there are no common trends in µ 0 and µ 1 , then it will perform especially well (Simulations 2 and 3). The X-learner performs particularly well when there are structural assumptions on the CATE or when one of the treatment groups is much larger than the other (Simulation 1 and 3). In the case where the CATE is 0, it usually does not perform as well as the S-learner, but it is significantly better than the T-learner (Simulations 4, 5, and 6), and in the case of a very complex CATE, it performs better than the S-learner and it often even outperforms the T-learner (Simulations 2 and 3). These simulation results have led us to the conclusion that unless one has a strong belief that the CATE is mostly 0, as a rule of thumb, one should use the X-learner with BART for small datasets and RF for bigger ones. In the sections to come, we will further support these claims with additional theoretical results and empirical evidence from real data and data-inspired simulations. In this section, we provide conditions under which the X-learner can be proven to outperform the T-learner in terms of pointwise estimation rate. These results can be viewed as attempts to rigorously formulate intuitions regarding when the X-learner is desirable. They corroborate our intuition that the X-learner outperforms the T-learner when one group is much larger than the other group and when the CATE function has a simpler form than those of the underlying response functions themselves. Let us start by reviewing some of the basic results in the field of minimax nonparametric regression estimation (18, 19, 20). In the standard regression problem, one observes N independent and identically distributed tuples (X i , Y i ) i ∈ R d×N × R N generated from some distribution P and one is interested in estimating the conditional expectation of Y given some feature vector x, The error of an estimatorμ N can be evaluated by the Expected Mean Squared Error (EMSE), For a fixed P, there are always estimators which have a very small EMSE. For example, choosingμ N ≡ µ would have no error. However, P and thus µ is unknown. Instead, one usually wants to find an estimator which achieves a small EMSE for a relevant set of distributions (such a set is relevant if it captures domain knowledge or prior information about the problem). To make this problem feasible, a typical approach is the minimax approach where one analyzes the worst performance of an estimator over a family, F , of distributions (21). The goal is to find an estimator which has a small EMSE for all distributions in this family. For example, if F 0 is the family of distributions P such that X ∼ Unif[0, 1], Y = βX +ε, ε ∼ N (0, 1), and β ∈ R, then it is well known that the OLS estimator achieves the optimal parametric rate. That is, there exists a constant C ∈ R such that for all P ∈ F 0 , EMSE(P,μ If, however, F 1 is the family of all distributions P such that X ∼ Unif[0, 1], Y ∼ µ(X) + ε and µ is a Lipschitz continuous function with bounded Lipschitz constant, then there exists no estimator that achieves the parametric rate uniformly for all possible distributions in F 1 . To be precise, we can at most expect to find an estimator that achieves a rate of N −2/3 and there exists a constant C , such that lim inf Estimators such as the Nadaraya-Watson and k-nearest neighbors can achieve this optimal rate (20, 22). Crucially, the fastest rate of convergence that holds uniformly for a family F is a property of the family to which the underlying data generating distribution belongs. It will be useful for us to define sets of families for which particular rates are achieved. Def inition 1 (Families with bounded minimax rate) For a ∈ (0, 1], we define S(a) to be the set of all families, F , with a minimax rate of at most N −a . Note that for any family F ∈ S(a) there exists an estimatorμ and a constant C such that for all N ≥ 1, From the examples above, it is clear that F 0 ∈ S(1) and F 1 ∈ S(2/3). Even though the minimax rate of the EMSE is not very practical since one rarely knows that the true data generating process is in some reasonable family of distributions, it is nevertheless one of the very few useful theoretical tools to compare different nonparametric estimators. If for a big class of distributions, the worst EMSE of an estimatorμ A is smaller than the worst EMSE ofμ B , then one might prefer estimatorμ A over estimatorμ B . Furthermore, if the estimator of choice does not have a small error for a family that we believe based on domain information could be relevant in practice, then we might expectμ to have a large EMSE in real data. Let us now employ the minimax approach to the problem of estimating the CATE. Recall that we assume a superpopulation, P, of random variables (Y (0), Y (1), X, W ) according to 1 and we observe N outcomes, ( . To avoid the problem that with a small but non-zero probability all units are treated or untreated, we analyze the expected mean squared error of an estimator given that there are 0 < n < N treated units, The expecatation is taken over the observed data, given that we observe n treated units, and X which is distributed according to P 1 . Similar to Defitintion 1, we characterize families of superpopulations by the rates at which the response functions and the CATE function can be estimated. 1 Refer to Section E for a careful treatment of the distributions involved. For a µ , a τ ∈ (0, 1], we define S(a µ , a τ ) to be the set of all families of distributions P of (Y (0), Y (1), X, W ) such that ignorability holds (Condition 1), the overlab condition (Condition 2) is satisfied, and the following conditions hold. 1. The distribution of (X, Y (0)) given W = 0 is in a family F 0 ∈ S(a µ ), 2. The distribution of (X, Y (1)) given W = 1 is in a family F 1 ∈ S(a µ ), 3. The distribution of (X, µ 1 (X) − Y (0)) given W = 0 is in a family F τ 0 ∈ S(a τ ), and 4. The distribution of (X, Y (1) − µ 0 (X)) given W = 1 is in a family F τ 1 ∈ S(a τ ). A simple example of a family in S(2/3, 1) is the set of distributions P for which X ∼ Unif([0, 1]), W ∼ Bern(1/2), µ 0 is any Lipschitz continuous function, τ is linear, and ε(0), ε(1) are independent standard normal distributed. We can also build on existing results from the literature to characterize many families in terms of smoothness conditions on the CATE and on the response functions. Example 1 Let C > 0 be an arbitrary constant and consider the family, F 2 , of distributions for which X has compact support in R d , the propensity score e is bounded away from 0 and 1 (Condition 2), µ 0 , µ 1 are C Lipschitz continuous, and the variance of ε is bounded. Then it follows (20) that Note that we don't have any assumptions on X apart from its support being bounded. If we are willing to make assumptions on the density (e.g., X is uniformly distirbuted), then we can characterize many distirbutions by the smoothness conditions of µ 0 , µ 1 , and τ . (20)) Let p = k + β for some k ∈ N and 0 < β ≤ 1, and let C > 0. exists and satisfies Example 2 Let C 1 , C 2 be arbitrary constants and consider the family, F 3 , of distributions for which X ∼ Unif([0, 1] d ), e ≡ c ∈ (0, 1), ε is two-dimensional normally disitributed, µ 0 and µ 1 are (p µ , C 1 )-smooth, and τ 7 is (p τ , C 2 )-smooth. 2 Then it follows (18, 20) that Let us intuitively understand the difference between the T and X learners. The T-Learner splits the problem of estimating the CATE into the two subproblems of estimating µ 0 and µ 1 separately. By appropriately choosing the base learners, we can expect to achieve the minimax optimal rates of m −aµ and n −aµ respectively, where C is some constant. Those rates translate immediately to rates for estimating τ , In general, we cannot expect to do better than this, when using an estimation strategy that falls in the class of TLearners, because the subproblems in Equation 10 are treated completely independently and there is nothing to be learned from the treatment group about the control group and vice versa. In Section F, we present a careful analysis of this result and we prove the following theorem. Theorem 1 (Minimax rates of the T-learner) For a family of superpopulations, F ∈ S(a µ , a τ ), there exist base learners to be used in the T-learner so that the corresponding T-learner estimates the CATE at a rate of The X-learner, on the other hand, can be seen as a locally weighted average of the two estimators,τ 0 and τ 1 (Eq. 9). Take for the moment,τ 1 . It consists of an estimator for the outcome under control which achieves a rate of m −aµ , and an estimator for the imputed treatment effects which should intuitively achieve a rate of n −aτ . We, therefore, expect that under some conditions on F ∈ S(a µ , a τ ), there exist base learners such thatτ 0 andτ 1 in the X-learner achieve the rates, respectively. Even though it is theoretically possible that a τ is similar to a µ , our experience with real data suggests that it 2 The assumption that X is uniformly distributed and the propensity score is constant can be generalized if one uses a slightly different risk (18, 23, 24). is often larger (i.e., the treatment effect is simpler to estimate than the potential outcomes), because the CATE function is often smoother or sparsely related to the feature vector. In this case, the X-learner converges at a faster rate than the T-learner. Remark 2 (Unbalanced groups) In many real-world applications, we observe that the number of control units is much larger than the number of treated units, m n. This happens, for example, if we test a new treatment and we have a large number of previous (untreated) observations that can be used as the control group. In that case, the bound on the EMSE of the T-learner will be dominated by the regression problem for the treated response function, The EMSE of the X-learner, however, will be dominated by the regression problem for the imputed treatment effects and it will achieve a faster rate of n −aτ , This is a substantial improvement over 13 when a τ > a µ , and it demonstrates that in contrast to the T-learner, the X-learner can exploit structural conditions on the treatment effect. We, therefore, expect the X-learner to perform particularly well, when one of the treatment groups is larger than the other. This can also be seen in our extensive simulation study presented in Section A and in the field experiment of social pressure on voter turnout presented in the application part of this paper. It turns out to be mathematically very challenging to give a satisfying statement for the extra conditions needed on F in 12. However, they are satisfied under weak conditions when the CATE is Lipschitz continuous (c.f. Section G.3) and, as we discuss in the following when the CATE is linear. We emphasize that we believe that this result holds in much greater generality. Let us discuss in the following families of distributions with a linear CATE, but without assumptions on the response functions other than that they can be estimated at some rate a. The treatment effect is linear, τ (x) = x T β, with β ∈ R d . There exists an estimatorμ m 0 and constants C 0 , a > 0 with To help our analysis, we also assume that the noise terms are independent given X and that the feature values are well behaved. The error terms ε i are independent given X, with E[ε i |X = x] = 0 and Var[ε i |X = x] ≤ σ 2 . Condition 6 X has finite second moments, and the eigenvalues of the sample covariance matrix of X 1 are well conditioned, in the sense that there exists an n 0 ∈ N and a constant C Σ ∈ R such that for all n > n 0 , Under these conditions, we can prove that the Xlearner achieves a rate of O(m −a + n −1 ). Theorem 2 Assume we observe m control units and n treated units from a superpopulation that satisfies Conditions 1-6, thenτ 1 of the X-learner withμ m 0 in the first stage and OLS in the second stage achieves a rate of O(m −a + n −1 ). Speficially, for all n > n 0 , m > 1, We note that an equivalent statement also holds for the pointwise MSE (Theorem 4) and forτ 0 . This example also suppports Remark 2, because if there are many control units, then the X-learner achieves the parametric rate in n, In fact as Theorem 5 shows, even if the number of control units are of the same order, we can often achieve the parametric rate. In this section, we consider two data examples. In the first example, we consider a large Get-Out-The-Vote (GOTV) experiment that explored if social pressure can be used to increase voter turnout in elections in the United States (1). In the second example, we consider an experiment that explored if door-to-door canvassing can be used to durably reduce transphobia in Miami (2). In both examples, the original authors failed to find evidence of heterogeneous treatment effects using simple linear models without basis expansion, and subsequent researchers and policy makers are acutely interested in treatment effect heterogeneity that could be used to better target the interventions. We use our honest random forest implementation (15) because of the importance of obtaining valid confidence intervals in these applications. Confidence intervals are obtained using a bootstrap procedure (Algorithm 6). In a large field experiment, Gerber et al. show that substantially higher turnout was observed among registered voters who received mailing promising to publicize their turnout to their neighbors (1). In the United States, whether someone is registered to vote and their past voting turnout is a matter of public record. Of course, how individuals voted is private. The experiment has been highly influential both in the scholarly literature and in political practice. In our reanalysis, we focus on two treatment conditions: the control group which was assigned to 191,243 individuals and the "neighbor's" treatment, which was assigned to 38,218 individuals. Note the unequal sample sizes. The experiment was conducted in Michigan before the August 2006 primary election, which was a statewide election with a wide range of offices and proposals on the ballot. The authors randomly assigned households with registered voters to receive mailers. The outcome, whether someone voted, was observed in the primary election. The "neighbors" mailing opens with a message that states "DO YOUR CIVIC DUTY-VOTE!." It then continues by not only listing the household's voting records but also the voting records of those living nearby. The mailer informed individuals that "we intent to mail an updated chart" after the primary. The study consists of seven key individual-level covariates, most of which are discrete: gender, age, and whether the registered individual voted in the primary elections in 2000, 2002 and 2004 that there is evidence of a negative backlash among a small number of people who only voted once in the past five elections prior to the general election 2004. Applied researchers have observed a backlash from these mailerse.g., some recipients call their Secretary of States office or local election registrar to complain (25, 26). The lower panel shows the distribution of CATE estimates for each of the subgroups. Having estimates of the heterogeneity enables campaigns to better target the mailers in the future. For example, if the number of mailers is limited, one should target potential voters who voted three times during the last five elections, since this group has the highest average treatment effect and it is a very big group of potential voters. 3 X-RF, S-RF and T-RF all provide similar estimates of the CATEs. This is unsurprising given the very large sample size, the small number of covariates, and their distributions. For example, the correlation between the CATE estimates of S-RF and T-RF is 0.99 (Results for S-RF and T-RF can be found in Figure 10 ). We conducted a data-inspired simulation study to see how these estimators would behave in smaller samples. We take the CATE estimates produced by T-RF, and we assume that they are the truth. We can then im-3 In praxis, it is not necessary to identify a particular subgroup. Instead, one can simply target units for which the predicted CATE is large. Training Size (in 1000) Figure 3: Simulation, Social pressure and Voter Turnout pute the potential outcomes, under both treatment and control for every observation. We then sample training data from the complete data and predict CATEs for the test data using S, T, and X RF. We keep the unequal treatment proportion observed in the full data fixedi.e., P(W = 1) = 0.167. Figure 3 presents the results for this simulation. They show that in small samples both X-RF and S-RF outperform T-RF, with X-RF performing the best, as one may conjecture given the unequal sample sizes. Reducing transphobia: A field experiment on door-to-door canvassing In an experiment that received wide-spread media attention, Broockman et al. show that brief (10 minutes) but high-quality door-to-door conversations can markedly reduce prejudice against gender nonconforming individuals for at least three months (2). This experiment was published in Science after the journal retracted an earlier article claiming to show the same in an experiment about gay rights (27). Broockman et al. showed that the earlier published study was fraudulent, and they conducted the new one to determine if the pioneering behavioral intervention of encouraging people to actively take the perspective of others was effective in decreasing prejudice (28). There are important methodological differences between this example and our previous one. The experiment is a placebo-controlled experiment with a parallel survey that measures attitudes, which are the outcomes of interest. The authors follow the design of (29). The authors 10 first recruited registered voters (n = 68, 378) via mail for an unrelated online survey to measure baseline outcomes. They then randomly assigned respondents of the baseline survey to either the treatment group (n = 913) or the placebo group that was targeted with a conversation about recycling (n = 912). Randomization was conducted at the household level (n = 1295), and because the design employs a placebo-control, the estimand of interest is the complier-average-treatment effect. Outcomes were measured by the online survey three days, three weeks, six weeks, and three months after the doorto-door conversations. We analyze results for the first follow-up. The final experimental sample consists of only 501 observations. The experiment was well powered despite its small sample size because it includes a baseline survey of respondents as well as post-treatment surveys. The survey questions were designed to have high over-time stability. The R 2 of regressing the outcomes of the placebocontrol group on baseline covariates using OLS is 0.77. Therefore, covariate adjustment greatly reduces sampling variation. There are 26 baseline covariates that include basic demographics (gender, age, ethnicity) and baseline measures of political and social attitudes and opinions about prejudice and views towards Miami's nondiscrimination law. The authors find an average treatment effect of 0.22 (SE: 0.072, t-stat: 3.1) on their transgender tolerance scale. 4 The scale is coded so that a larger number implies greater tolerance. The variance of the scale is 1.14, with a minimum observed value of -2.3 and maximum observed value of 2. This is a large effect given the scale. For example, the estimated decrease in transgender prejudice is greater than Americans' average decrease in homophobia from 1998 to 2012, when both are measured as changes in standard deviations of their respective scales. The authors report finding no evidence of heterogeneity in the treatment effect that can be explained by the observed covariates. Their analysis is based on linear models (OLS, lasso and elastic net) without basis expansions. 5 Figure 4 (a) presents our results for estimating the CATE using X-RF. We find that there is strong evidence that the positive effect that the authors find is only found among a subset of respondents, that can be targeted based on observed covariates. The average of our CATE estimates is within half a standard deviation of the ATE that the authors report. Unlike our previous data example, there are marked differences in the treatment effects estimated by our three learners. Figure 4 (b) presents the estimates from T-RF. 4 The authors' transgender tolerance scale is the first principle component of combining five −3 to +3 Likert scales. See (2) for details. 5 (2) estimate the CATE using Algorithm 4 in Appendix H. These estimates are similar to those of X-RF, but with a larger spread. Figure 4 (c) presents the estimates from S-RF. Note that the average CATE estimate of S-RF is much lower than the ATE reported by the original authors and the average CATE estimates of the other two learners. And almost none of the CATE estimates are significantly different from zero. Recall that the ATE in the experiment was estimated with precision, and was large both substantively and statistically (t-stat=3.1). In this data, S-RF appears to be shrinking the treatments estimates towards zero. The ordering of the estimates we see in this data application is often what we have observed in simulations: The S-learner has the least spread around zero, the T-learner has the largest spread, and the X-learner is somewhere in between. Unlike the previous data example, the covariates are strongly predictive of the outcomes, and the splits in the S-RF are mostly on the features rather than the treatment indicator, because they are more predictive of the observed outcomes than the treatment assignment (c.f., Figure 11 ). This paper reviewed meta-algorithms for CATE estimation including the T and S learners. It then introduced a new meta-algorithm, the X-learner, that can translate any supervised learning or regression algorithm or a combination of such algorithms into a CATE estimator. The X-learner is adaptive to various settings. For example, 11 both theory and data examples show that it performs particularly well when one of the treatment groups is much larger than the other or when the separate parts of the X-learner are able to exploit the structural properties of the response and treatment effect functions. Specifically, if the CATE function is linear, but the response functions in treatment and control only satisfy Lipschitz continuous conditions, the X-learner can still achieve the parametric rate if one of the treatment groups is much larger than the other (Theorem 2). If there are no regularity conditions on the CATE function and the response functions are Lipschitz continuous, then both the X-learner and the T-learner obtain the same minimax optimal rate (Theorem 7). We conjecture that these results hold for more general model classes than those in our theorems. We have presented an extensive set of simulations to understand the finite sample behaviors of different implementations of these learners, especially for model classes that are not covered by our theoretical results. We have also examined two data applications. Although none of the meta-algorithms is always the best, the X-learner performs well overall, especially in the real data examples. In practice, in finite samples, there will always be gains to be had if one accurately judges the underlying data generating process. For example, if the treatment effect is simple, or even zero, then pooling the data across treatment and control conditions will be beneficial when estimating the response model (i.e., the S-learner will perform well). However, if the treatment effect is strongly heterogeneous and the response surfaces of the outcomes under treatment and control are very different, pooling the data will lead to worse finite sample performance (i.e., the T-learner will perform well). Other situations are possible and lead to different preferred estimators. For example, one could slightly change the S-learner so that it shrinks to the estimated ATE instead of zero, and it would then be preferred when the treatment effect is constant and non-zero. One hopes that the X-learner can adapt to these different settings. The simulations and real data studies presented have demonstrated the X-learner's adaptivity. However, further studies and experience with more real datasets are necessary. In ongoing research, we are investing using other supervised learning algorithms, and we are creating a deep learning architecture for estimating CATE. We are also exploring an alternative to the X-learner, the U-learner (Algorithm 5), that takes advantage of situations where the propensity score is easy to estimate and when there is much confounding-e.g., Simulation 6, (30). The Ulearner is in some sense similar to the ATE estimator of Chernozhukov et al. (31) and an estimator for partially linear models by Robinson (32), but for nonparametric CATE estimation. A very recent paper proposes a modified version of the U-learner which is not a meta-learner because it requires the adaptation of the base learner in the second stage (33). We do not believe that under our assumptions, this modification of the U-learner or the U-learner generally performs better than the S-learner or the T-learner, but we want to explore the properties of the U-learner in future research.
The final CATE estimate is a weighted average of the two estimates REF .
Meta-learners for Estimating Heterogeneous Treatment Effects using Machine Learning
Mathematics Medicine