Causal Effect Identification from Multiple Incomplete Data Sources : A General Search-Based Approach
Full text
This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ Causal Effect Identification from Multiple Incomplete Data Sources : A General Search- Based Approach © Authors, 2021 Published version Tikka, Santtu; Hyttinen, Antti; Karvanen, Juha Tikka, S., Hyttinen, A., & Karvanen, J. (2021). Causal Effect Identification from Multiple Incomplete Data Sources : A General Search-Based Approach. Journal of Statistical Software, 99, Article 5. https://doi.org/10.18637/jss.v099.i05 2021
JSS Journal of Statistical Software August 2021, Volume 99, Issue 5. doi: 10.18637/jss.v099.i05 Causal Effect Identification from Multiple Incomplete Data Sources: A General Search-Based Approach Santtu Tikka University of Jyvaskyla Antti Hyttinen University of Helsinki Juha Karvanen University of Jyvaskyla Abstract Causal effect identification considers whether an interventional probability distribution can be uniquely determined without parametric assumptions from measured source distributions and structural knowledge on the generating system. While complete graphical criteria and procedures exist for many identification problems, there are still challenging but important extensions that have not been considered in the literature such as combined transportability and selection bias, or multiple sources of selection bias. To tackle these new settings, we present a search algorithm directly over the rules of do-calculus. Due to the generality of do-calculus, the search is capable of taking more advanced datagenerating mechanisms into account along with an arbitrary type of both observational and experimental source distributions. The search is enhanced via a heuristic and search space reduction techniques. The approach, called do-search, is provably sound, and it is complete with respect to identifiability problems that have been shown to be completely characterized by do-calculus. When extended with additional rules, the search is capable of handling missing data problems as well. With the versatile search, we are able to approach new problems for which no other algorithmic solutions exist. We perform a systematic analysis of bivariate missing data problems and study causal inference under case-control design. We also present the Rpackage dosearch that provides an interface for a C++ implementation of the search. Keywords: causality, do-calculus, selection bias, transportability, missing data, case-control design, meta-analysis. 1. Introduction In many fields of science, a primary interest is determining causal effects, that is, distributions P(Y|do(X),Z), where variables Yare observed, variables Xare intervened upon (forced to
2Causal Effect Identification from Multiple Incomplete Data Sources values irrespective of their natural causes) and variables Zare conditioned on (Pearl 2009). In this paper, instead of placing various parametric restrictions based on background knowledge, we are interested in the question of identifiability: can the causal effect be uniquely determined from the distributions (data) we have and a graph representing our structural knowledge on the generating causal system. In the most basic setting we are identifying causal effects from a single observational input distribution, corresponding to passively observed data. To solve such problems more generally than what is possible with the back-door adjustment (Spirtes, Glymour, and Scheines 1993; Pearl 2009;Greenland, Robins, and Pearl 1999), Pearl (1995) introduced do-calculus, a set of three rules that together with probability theory enable the manipulation of interventional distributions. Shpitser and Pearl (2006b) and Huang and Valtorta (2006b) showed that docalculus is complete by presenting polynomial-time algorithms whose each step can be seen as a rule of do-calculus or as an operation based on basic probability theory. The algorithms have a high practical value because the rules of do-calculus do not by themselves provide an indication on the order in which the rules should be applied. The algorithms save us from manual application of do-calculus, which is a tedious task in all but the simplest problems. Since then many extensions of the basic identifiability problem have appeared. In identifiability using surrogate experiments (Bareinboim and Pearl 2012a), or z-identifiability, an experimental distribution is available in addition to the observed probability distribution. For data observed in the presence of selection bias, both algorithmic and graphical identifiability results have been derived (Bareinboim and Tian 2015;Correa, Tian, and Bareinboim 2018). More generally, the presence of missing data necessitates the representation of the missingness mechanism, which poses additional challenges (Mohan, Pearl, and Tian 2013; Shpitser, Mohan, and Pearl 2015;Bhattacharya, Nabi, Shpitser, and Robins 2019). Another dimension of complexity is the number of available data sources. Identification from a mixture of observational and interventional distributions that originate from multiple conceptual domains is known as transportability for which complete solutions exist in a specific setting (Bareinboim and Pearl 2014). While completeness has been accomplished for a number of basic identifiability problems, there are still many challenging but important extensions to the identifiability problem that have not been studied so far. Table 1recaps the current state of the art identifiability results; it also describes generalizations that we aim to investigate in this paper. To find solutions to the more complicated identifiability problems, we present a unified approach to the identification of observational and interventional causal queries by constructing a search algorithm that directly applies the rules of do-calculus. We impose no restrictions on the number or type of known input distributions: we thus provide a solution to problems for which no other algorithmic solutions exist (Row 8 in Table 1). We also extend to identifiability under missing data together with mechanisms related to selection bias and transportability (Row 11 in Table 1). The following introductory example does not fall under any of the previously solved special cases of Table 1, thus necessitating our approach. Consider human resource management analyzing the remuneration policy in a company. The graph of Figure 1shows the key variables. The salary (Y) of an employee consist of a base salary (not modeled explicitly) and a bonus (B). The base salary depends on education (E) and performance (X) of the employee. The level of performance is evaluated by the supervisor of the employee and it is one of the factors that affects the level of bonus. The performance depends on the education
Journal of Statistical Software 3 X: Performance E: Education Y: Salary B: Bonus A: Attitude Figure 1: Graph for the example on human resource management in a company. as well as the attitude (A) of the employee and the team. The attitude may also have a direct effect on the bonus. We are interested in estimating the total causal effect of performance on the salary, i.e., quantifying how changes in performance affect the salary. The salary (Y), bonus (B), education (E) and performance (X) of the employees are available from the registry of the human resource department. Data on attitude (A), bonus (B) and performance (X) have been collected in an anonymized survey that cannot be linked to the registry on the personal level. The question of interest is the identifiability of P(Y|do(X)) from the data sources P(Y, B, E, X)and P(A, B, X). Using the machinery developed in this paper, we can identify the causal effect with the formula P(Y|do(X)) = X B,A P(A)P(B|X, A)X E P(E)P(Y|X, B, E), where the conditional distributions can be directly determined from the available data sources (see Section 6for further details). To combat the inherent computational complexity of the search-based approach, we derive rules and techniques that avoid unnecessary computational steps. We are able to detect trivial queries where non-identifiability can be determined directly from the inputs. We also present a search heuristic that considerably speeds up the search in cases where the effect is indeed identifiable. The approach, called do-search, is provably sound and it retains the completeness in the cases previously proven to be solved by the rules of do-calculus. We can easily scale up to the problem sizes commonly reported in the literature. The Rpackage dosearch (R Core Team 2021;Tikka, Hyttinen, and Karvanen 2021) provides an implementation of dosearch and is available from the Comprehensive RArchive Network (CRAN) at https:// CRAN.R-project.org/package=dosearch. Other available software for causal effect identifiability problems are only applicable to a subset of the problems presented in Table 1. The causaleffect Rpackage (Tikka and Karvanen 2017a) can only be used for problems on Rows 1–3 and 5–7 of the table, providing implementations of the relevant algorithms. For the problem on Row 1, the generalized adjustment criterion (Perković, Textor, Kalisch, and Maathuis 2015) can be applied using the dagitty package (Textor, Van der Zander, Gilthorpe, Liśkiewicz, and Ellison 2016) or the pcalg package (Kalisch, Mächler, Colombo, Maathuis, and Bühlmann 2012) in R. The generalized back-door criterion (Maathuis and Colombo 2015) is also available in the pcalg Rpackage. The standard back-door criterion is available in the Python package DoWhy (Sharma and
4Causal Effect Identification from Multiple Incomplete Data Sources Missing Problem Input data Method (Reference) Target (assumptions) pattern (complete) 1 Causal effect identifiability P(Y|do(X)) P(V)None ID (Shpitser and Pearl 2006b) (Yes) 2 Causal effect identifiability P(Y|do(X),Z)P(V)None IDC (Shpitser and Pearl 2006a) (Yes) 3z-identifiability P(Y|do(X),Z)P(V),P(V\B|do(B)) None zID (Bareinboim and Pearl 2012a)(NE, ED) (Yes) 4g-identifiability P(Y|do(X)) {P(V\Bi|do(Bi)}None gID (Lee, Correa, and Bareinboim 2019) (ED) (Yes) 5 Surrogate outcome P(Y|do(X),Z){P(Ai|do(Bi),Ci)}None TRSO identifiability (NE, SO) (No) (Tikka and Karvanen 2019) 6mz-transportability P(Y|do(X),Z){P(V\(Bi∪Ti)|do(Bi),Ti)}None TRmz (Bareinboim and Pearl 2014)(NEDD, ED) (Yes) 7 Selection bias recoverability P(Y|do(X),Z)P(V\S|S)Selection RC (Bareinboim and Tian 2015) (Unknown) 8 Generalized identifiability P(Y|do(X),Z){P(Ai|do(Bi),Ci)}None do-search (Unknown) 9 Missing data recoverability P(V)P(V∗)Restricted – (Mohan et al. 2013) (Yes) 10 Missing data recoverability P(V)P(V∗)Arbitrary – (Bhattacharya et al. 2019) (Unknown) 11 Generalized identifiability P(Y|do(X),Z){P(A∗ i|do(Bi),C∗ i)}Arbitrary do-search with missing data (No) Table 1: Solved and unsolved problems in causal effect identification. Bold-italic denotes the previously unsolved problems for which do-search can now be used. Input P(V)stands for passively observed joint distribution of all variables. Input P(V∗)is the joint distribution with missing data (see Section 4). The variable sets present in the same distribution are disjoint. Input P(V\B|do(B)) stands for an experiment where all variables are measured and input P(A|do(B)) stands for an experiment where only a subset A⊂Vof the variables is measured. Notation {·} denotes a set of inputs enumerated by the index i. The assumptions of nested experiments (NE), entire distributions (ED) and nested experiments in different domains (NEDD) are explained in Section 2. Assumptions related to surrogate outcomes (SO) can be found in (Tikka and Karvanen 2019). Input P(V|S)means the joint distribution under selection bias. The last column gives the name of an algorithm that can be used to solve the problem if one exists and whether it (or a theorem when no algorithm is provided) provides a complete solution to the problem, or whether the completeness status is not known. An algorithm is complete if it returns a correct formula precisely when the target query is identifiable. Problems 1–7 are special cases of Problem 8 and Problems 1–10 are special cases of Problem 11. Kiciman 2019). Algorithms implemented in causaleffect run in polynomial time and can outperform dosearch in their respective restricted problem settings especially with larger graphs. For a comprehensive performance comparison between causaleffect and various adjustment criteria, see (Van der Zander, Liśkiewicz, and Textor 2019).
Journal of Statistical Software 5 The paper is structured as follows. Section 2formulates our general identification problem and explains the scenarios in Table 1and previous research in detail. Section 3presents the search algorithm, including the rules we use, search space reduction techniques, heuristics and theoretical properties. Section 4shows how the search can be extended to problems that involve missing data. Section 5demonstrates how the search can be used in Rvia the dosearch package. Efficacy of the search is assessed via simulations. Section 6shows a number of new problems for which we can find solutions by using the search including a real-world application. These problems include combined transportability and selection bias, multiple sources of selection bias, and causal effect identification from arbitrary (experimental) distributions. This section also includes a systematic analysis of missing data problems and case-control designs. Section 7discusses the merits and limitations of the approach. Section 8 offers concluding remarks. 2. The general causal effect identification problem Our presentation is based on structural causal models (SCM) and the language of directed graphs. We assume the reader to be familiar with these concepts and refer them to detailed works on these topics for extended discussion and descriptions, such as (Pearl 2009) and (Koller and Friedman 2009). Following the standard set-up of do-calculus (Pearl 1995), we assume that the causal structure can be represented by a semi-Markovian causal graph Gover a set of vertices V(see Figure 2(a) for example). The directed edges correspond to direct causal relations between the variables (relative to V); directed edges do not form any cycles. Confounding of any two observed variables in Vby some unobserved common cause is represented by a bidirected edge between the variables. This graphical representation allows us to deal with any causal structures where some variables are unmeasured. We assume a positive distribution over the variables (Huang and Valtorta 2006a) ensuring that all considered causal effects and conditional distributions are well-defined. In a non-parametric setting, the problem of expressing a causal quantity of interest in terms of available information has been described in various ways depending on the context. When available data are affected by selection bias or missing data, a typical goal is to “recover” a joint or marginal distribution. If data are available from multiple conceptual domains, a distribution is “transported” from the source domains, from which a combination of both observational and experimental data are available, to a target domain. The aforementioned settings can be expressed in the SCM framework by equipping the graph of the model with special vertices. However, on a fundamental level these problems are simply variations of the original identifiability problem of causal effects and as such, our goal is to represent them as a single generalized identifiability problem. Formally, identifiability can be defined as follows (Pearl 2009;Shpitser and Pearl 2008). Definition 1 (Identifiability).Let Mbe a set of models with a description Tand two objects φand θcomputable from each model. Then φis identifiable from θin Tif φis uniquely computable from θin any model M∈M. In other words, all models in Mwhich agree on θ also agree on φ. In the simplest case, the description Trefers to the graph induced by causal model, θis the joint distribution of the observed variables P(V)and the query φis a causal effect
6Causal Effect Identification from Multiple Incomplete Data Sources P(Y|do(X)). On the other hand, proving non-identifiability of φfrom θcan be obtained by describing two models M1, M2∈Msuch that θis the same in M1and M2, but object φin M1is different from φin M2. The general form for a causal identifiability problem that we consider in this paper is formulated as follows. Input: A set of input distributions of the form P(Ai|do(Bi),Ci), a query P(Y|do(X),Z) and a semi-Markovian causal graph Gover V. Task: Output a formula for the query P(Y|do(X),Z)over the input distributions, or decide that it is not identifiable. Here Ai,Bi,Ciare disjoint subsets of Vfor all i, and X,Y,Zare disjoint subsets of V. The causal graph Gmay contain vertices which describe mechanisms related to transportability and selection bias. In the following sections we explain several important special cases of this problem definition, some that have been considered in the literature and some which have not been. 2.1. Previously considered scenarios as special cases We restate the concepts of transportability and selection bias under the causal inference framework, and show that identifiability in the scenarios of Rows 1–7 of Table 1falls under the general form on Row 8. We return to problems that involve missing data on Rows 9–11 later in Section 4. Causal effect identifiability Input is restricted to a passive observational distribution P(V). The target is either a causal effect P(Y|do(X)) for Row 1 of Table 1or a conditional causal effect P(Y|do(X),Z)for Row 2 of Table 1(Shpitser and Pearl 2006b,a). z-identifiability Similarly to ordinary causal effect identification, the input consists of the passive observational distribution P(V)but also of experimental distributions known as surrogate experiments intervening on a set B(Bareinboim and Pearl 2012a). Two restricting assumptions, which we call nested experiments and entire distributions, apply to surrogate experiments. Experiments are called nested experiments (NE) when for each experiment intervening a set of variables B, experiments intervening on all subsets of Bare available as well. Entire distributions (ED) denote the assumption that the union of observed and intervened variables is always the set of all variables V. g-identifiability Unlike z-identifiability, the input does not contain the passive observational distribution P(V) but consists instead of surrogate experiments on the sets {Bi}(Lee et al. 2019) without the assumption of nested experiments. The assumption of entire distributions holds.
Journal of Statistical Software 7 Surrogate outcome identifiability Surrogate outcomes generalize the notion of surrogate experiments from z-identifiability. For surrogate outcomes, the assumption of nested experiments still holds, but the assumption of entire distributions can be dropped. Some less strict assumptions (SO) still apply (Tikka and Karvanen 2019). The idea of surrogate outcomes is that data from previous experiments are available, but the target Ywas at most only partially measured in these experiments and the experiments do not have to be disjoint from X. Transportability The problem of incorporating data from multiple causal domains is known as transportability (Bareinboim and Pearl 2013). Formally, the goal is to identify a query in a target domain π∗using data from source domains π1, . . . , πn. The domains are represented in the causal graph using a special set of transportability nodes Twhich is partitioned into disjoint subsets T1,...,Tncorresponding to each domain πi. The causal graph contains an extra edge Tij → Vjwhenever a functional discrepancy in fVjor in P(uVj)exists between the target domain π∗and the source domain πi. The discrepancy is active if Tij = 1 and inactive otherwise. A distribution associated with a domain πiis of the form P(A|do(B),C,Ti= 1,T−i= 0), where T−idenotes the other subsets of the partition of Texcept Ti. In other words, only the discrepancies between the πiand π∗are active. A distribution corresponding to the target domain has no active discrepancies meaning that it is of the form P(A|do(B),C,T= 0). Any variable is conditionally independent from inactive transportability nodes since their respective edges vanish. Furthermore, since transportability nodes set to 0vanish, we can assume any present transportability node to have the value 1. Thus an input distribution from a domain πitakes the form P(A|do(B),C,Ti). In the specific case of mz-transportability, the assumptions of entire distributions (ED) and nested experiments in different domains (NEDD) apply, which means that P(V\(B0 i∪Ti)|do(B0 i),Ti)is available for every subset B0 iof Biin each domain πi. Selection bias recoverability Selection bias can be seen as a special case of missing data, where the mechanism responsible for the preferential selection is represented in the causal graph by a special sink vertex S (Bareinboim and Pearl 2012b). Typical input for the recoverability problem is P(V|S= 1), the joint distribution observed under selection bias. Just as in the case of transportability nodes, selection bias nodes only appear when the mechanism has been enabled. Thus we may assume that the input is of form P(V|S). More generally, we can consider input distributions of the form P(A|do(B),C, S). 2.2. New scenarios as special cases The following settings are special cases of the general identifiability problem of Row 8 in Table 1that do not fall under any of the problems of Rows 1–7. They serve as interesting additions to the cases considered in the literature. Concrete examples on these new scenarios are presented in Section 6. Section 4extends the general problem of Row 8 in Table 1to the general problem with missing data on Row 11 while also showcasing the special cases of Rows 9 and 10.
8Causal Effect Identification from Multiple Incomplete Data Sources Multiple data sources with partially overlapping variable sets The scenario where only subsets of variables are ever observed together has been extensively considered in the causal discovery literature (Danks, Glymour, and Tillman 2009;Tillman and Spirtes 2011;Triantafillou, Tsamardinos, and Tollis 2010), but not in the context of causal effect identification. In the basic setting the input consists of passively observed distributions P(Ai)such that Ai⊂V. We may also observe experimental distributions P(Ai|do(Bi)) (Hyttinen, Eberhardt, and Hoyer 2012;Triantafillou and Tsamardinos 2015) or even conditionals P(Ai|do(Bi),Ci). Our approach sets no limitations for the number or types of input distributions. Combining transportability and selection bias To the best of our knowledge, the frameworks of transportability and selection bias have not been considered simultaneously. The combination of these scenarios fits into the general problem formulation. For example, we may have access to two observational distributions originating from different source domains, but affected by the same biasing mechanism: P(A1|C1, T1, S)and P(A2|C2, T2, S), where T1and T2are the transportability nodes corresponding to the two source domains and Sis the selection bias node. Recovering from multiple sources of selection bias In recent literature on selection bias as a causal inference problem, the focus has been on settings where only a single selection bias node is present (e.g., Bareinboim, Tian, and Pearl 2014;Correa and Bareinboim 2017;Correa et al. 2018). However, multiple sources of selection bias are typical in longitudinal studies where dropout occurs at different stages of the study. Our approach is applicable for an arbitrary number of selection bias mechanisms and input distributions affected by arbitrary combinations of these mechanisms. In other words, if Sis the set of all selection bias nodes present in the graph, the inputs can take the form P(A|do(B),C,S0), where S0is an arbitrary subset of S. 3. A search-based approach for causal effect identification The key to identification of causal effects is that interventional expressions can be manipulated using the rules of do-calculus. We present these rules for augmented graphs where an additional intervention variable IXsuch that IX→Xis added to the induced graph for each variable X(Spirtes et al. 1993;Pearl 2009;Lauritzen 2000) (see Figure 2(b)). Now a dseparation condition (or m-separation (Richardson 2003)) of the form Y⊥⊥ IZ|X,Z,W|| X means that nodes Yand intervention nodes IZof Zare d-separated given X,Zand Win a graph where edges incoming to (intervened) Xhave been removed (Hyttinen, Eberhardt, and Järvisalo 2015;Dawid 2002). The three rules of do-calculus (Pearl 1995) can be expressed as follows: P(Y|do(X),Z,W) = P(Y|do(X),W),if Y⊥⊥ Z|X,W|| X P(Y|do(X,Z),W) = P(Y|do(X),Z,W),if Y⊥⊥ IZ|X,Z,W|| X P(Y|do(X,Z),W) = P(Y|do(X),W),if Y⊥⊥ IZ|X,W|| X (1) The rules are often referred to as insertion/deletion of observations, exchange of actions and observations, and insertion/deletion of actions respectively. Each rule of do-calculus is
Journal of Statistical Software 15 Algorithm 2 do-search Input: Target Q=P(Y|do(X),W), a semi-Markovian graph Gand a set of known distributions P={P1, . . . , Pn}. Output: A formula Ffor Qin terms of Por NA 1: if Q∈P,return Q 2: if target is non-identifiable by Theorem 1,then return NA 3: let Ube the set of unexpanded distributions, initially U:= P 4: while U6=∅,do 5: let P0be the unexpanded distribution closest to the target: P0= argmax Pi∈U h(Q, Pi) 6: let Mbe the set of rules of Table 2, without Rules 1±, such that the termination conditions of Table 3do not hold with respect to P0. 7: let P∗be the set of all distributions derived from P0using the rules in M 8: for each new candidate distribution P∗∈P∗,do 9: if P∗is already in P,then continue 10: if the validity conditions of Table 3are not satisfied by P∗,then continue 11: if an additional input is required that is not in P,then continue 12: if Rule 2±or 3±of Table 2is applied and the corresponding d-separation Criterion 1 is not satisfied by G,then continue 13: if P∗=Q,then 14: Derive a formula Ffor Qby backtracking. 15: return F 16: Add P∗to P, add P∗to U 17: Mark P0as expanded: remove P0from U 18: return NA The iteration over the unexpanded distributions Uproceeds as follows (Lines 4–5). Each input distribution and terms derived from it are assigned into a priority queue, where the priority is determined by the value given by the proximity function h. Distributions closest to the target are expanded first. In the implementation, only the actual memory addresses of the distribution objects are placed into the queue. The set Pis implemented as a hash table that serves as a container for all input distributions and those derived from them. Each new distribution is assigned a unique index that also serves as the hash function for this table. The distribution objects contained in the table are represented uniquely by three integers corresponding to the sets A,Band Cof the general form P(A|do(B),C). A distribution object also contains additional auxiliary information such as which rule was used to derive it, whether it is expanded or not and from which distribution it was obtained. This information is used to construct the derivation if the target is found to be identifiable. Multiple distributions can share the same value of the proximity function h. In the case that multiple candidates share the maximal value, the one that was derived the earliest takes precedence. When the unexpanded distribution currently closest to the target is determined, the rules of Table 2are applied sequentially for all valid subsets dictated by Table 3. When rules two and three of do-calculus are considered, the necessary d-separation criteria is checked from G(Line 12). For the chain rule, the presence of the required second input is also verified. The reverse lookup is implemented by using another hash table, where the hash function is based on the unique representation of each distribution object. The values contained in the
16 Causal Effect Identification from Multiple Incomplete Data Sources table are the indices of the derived distributions. The same hash table is also used to ensure that we do not attempt to derive distributions again that have been previously found to be identifiable from the inputs. We construct a set Mof applicable rules for each unexpanded distribution P0using the termination conditions of Table 3(Line 6). If all the necessary conditions have been found to hold for an applicable rule and a subset, the newly derived distribution P∗is added to the set of known distributions and placed into the priority queue as an unexpanded distribution. When the applicable rules and subsets have been exhausted for the current distribution P0, the term is marked as expanded and removed from the queue (Line 17). If the target distribution is found at any point (Line 13), a formula is returned for it in terms of the original inputs. Alternatively, we can also continue deriving distributions to obtain different search paths to the target that can possibly produce different formulas for it. If instead we exhaust the set of unexpanded distributions by emptying the queue, the target is deemed non-identifiable by the search (Line 18). We keep track of the rules that were used to derive each new distribution in the search. This allows us to construct a directed graph of the derivation where each root node is a member of the original input set Pand their descendants are the distributions derived from them during the search. Each edge represents a manipulation of the parent node(s) to obtain the child node. For an identifiable target quantity, the formula Fis obtained by backtracking the chain of manipulations recursively until the roots are reached (Line 14). The derivation of the example in the beginning of Section 3depicted in Figure 2(c) can be efficiently found by applying this procedure. We assess the worst case complexity of do-search in terms of the input graph size, which is the primary determining factor of the search time. Checks for separation and termination and validation conditions all run in polynomial time with respect to the number of vertices, but the number of distributions grows very rapidly. In a hypothetical absolute worst case scenario, the target is not identifiable, but every other distribution is. Supposing a graph with dvertices, we can determine how many distributions would have to be derived by the search in order to exhaust the search space. For a distribution of the form P(A|do(B),C), any variable in Vcan either belong to the sets A,Bor Cor not be present in the distribution, meaning that there are 4dways to categorize every variable. However, we must account for the fact that there must always be at least one variable in the set A. There are 3dways to assign all the variables in such a way that no variable is a member of set A. Thus the total number of distributions considered by do-search grows as O(4d). See the simulations of Section 5.1 for running time performance in more realistic settings. 3.4. Soundness and completeness properties We are ready to establish some key theoretical properties of do-search. The first theorem considers the correctness of the search. Theorem 2 (Soundness).do-search always terminates: if it returns an expression for the target Q, it is correct, if it returns NA then Qis not identifiable with respect to the rules of do-calculus and standard probability manipulations (in Table 2). Proof. Each new distribution is derived by using only well-defined manipulations as outlined by Table 3and by ensuring that the required separation criteria hold in Gwhen rules of do-
Journal of Statistical Software 17 calculus are concerned. It follows that if the search terminates and returns a formula for the target distribution, it was reached from the set input distributions through a sequence of valid manipulations. If do-search terminates as a result of Theorem 1, we are done. Suppose now that Theorem 1does not apply. By definition, do-search enumerates every rule of Table 2for every well-defined subset of Table 3. By Lemma 1, no distributions are left out by applying the termination criteria of Table 3. We know that if Rules 1±of Table 3are omitted, the distributions generated by these rules can be obtained by a combination of Rules 2±and 3±. Furthermore, the order in which the distributions are expanded does not matter, as every possible manipulation is carried out nonetheless. The search will eventually terminate, since distributions that have already been derived are not added again to the set of unexpanded distributions and there are only finitely many ways to apply the rules of Table 2. The following theorem provides a completeness result in connection to existing identifiability results. Since do-calculus has been shown to be complete with respect to (conditional) causal effect identifiability, z-identifiability, g-identifiability and transportability, it follows that dosearch is complete for these problems as well. Theorem 3 (Completeness).If do-search returns NA in the settings in Rows 1–4 and 6 in Table 1, then the query is non-identifiable. Proof. Do-calculus has been shown to be complete in these settings. The rules of probability calculus encode what is used in the algorithms as can be seen for example from the proofs of Theorem 7 and Lemmas 4–8 of Shpitser and Pearl (2006b). It is not known whether the rules implemented in do-search are sufficient for other more general identifiability problems since it is conceivable that some additional rules might exist that would be required to achieve completeness. One such generalization is the inclusion of missing data in the causal model, which we present in Section 4. However, if one were to show that do-calculus (or any other set of rules included in do-search) is complete for some special case of the generalized identifiability problem, then do-search would be complete for this problem as well. In the following sections we will use the term “identifiable by do-search” to refer to causal queries that can be identified by do-search. 4. Extension to missing data problems The SCM framework can be extended to describe missing data mechanisms. For each variable Vi, two special vertices are added to the causal graph. The vertex V∗ iis the observed proxy variable which is linked to the true variable Vivia the missingness mechanism (Little and Rubin 1986;Mohan et al. 2013): V∗ i=(Vi,if RVi= 1, NA,if RVi= 0,(2) where NA denotes a missing value and RViis called the response indicator (of Vi). In other words, the variable V∗ ithat is actually observed matches the true value Viif it is not missing (RVi= 1). We note that in this formulation, each true variable has its own response indicator, meaning that we do not consider shared indicators between variables or multiple indicators
18 Causal Effect Identification from Multiple Incomplete Data Sources for a single variable. Figure 11 in Section 6.4 depicts some examples of graphs containing missing data mechanisms. Furthermore, if there is no missingness associated with a given variable Vimeaning that it is fully observed, the corresponding response indicator RVialways has the value 1. The omission of a proxy variable and a response indicators of a specific variable from a graph encodes the assumption that the variable in question if fully observed. Note that intervention nodes are added for true variables and response indicators but not for proxy variables. On a symbolic level one could intervene on proxy variables, however we are only interested in interventions that keep Equation 2intact. The observed vertices of the causal diagram can be partitioned into three categories V=Vt∪V∗∪Vr, where Vtis the set of true variables, V∗is the set of proxy variables and Vris the set of response indicators. For any subset Z⊂Vwe define the same partition via Zt=Z∩Vt, Z∗=Z∩V∗and Zr=Z∩Vr. The definition of the response indicator connects a proxy variable and a true variable. Typically this connection is only of interest for those variables Vithat have missing data, meaning that P(RVi= 1) <1. Furthermore, we often utilize a proxy variable corresponding to a specific true variable and conversely, a true variable corresponding to a specific proxy variable. We define this correspondence explicitly in the following way Z(t→∗)={V∗ i∈V∗|Vi∈Zt, P (RVi= 1) <1}, Z(∗→t)={Vi∈Vt|V∗ i∈Z∗, P (RVi= 1) <1}. Similarly, given a set Zwe often require the set of the response indicators that define the missingness mechanism for the true variables that are member of Z. This set is defined as follows RZ={RVi∈Vr|Vi∈Zt, P (RVi= 1) <1}. It is important to note the difference between the sets Zrand RZ; the first set denotes the set of response indicators that are members of Zwhile the second gives the corresponding response indicators for the true variables that are member of Z. Our method is also capable of processing queries when the causal graph contains missing data mechanisms where the sets Ai,Biand Ciof some of the input distributions may be restricted to contain observed variables in V∗∪Vr. An active response indicator RVi= 1 is denoted by R1 Vi. Similarly, for sets of response indicators R1 Zdenotes that all indicators in the set are active. Proxy variables are not explicitly shown in graphs for clarity. Determining identifiability is challenging under missing data. As evidence of this, even some non-interventional queries require the application of do-calculus (Mohan and Pearl 2018). Furthermore, the rules used in the search of Table 2are no longer sufficient and deriving the desired quantity necessitates the use of additional rules that stem from the definition of the proxy variables and the response indicator. Each new true variable also has a higher impact on computational complexity, since the corresponding response indicator and proxy variable are always added to the graph as well. Table 4extends the set of rules of Table 2 to missing data problems by providing manipulations related to the missingness mechanism. Rules 7±and 8±perform conditioning using the chain rule. These rules are necessary in the case that set Ycontains missing data mechanisms that have been enabled and thus cannot be marginalized over by using Rule 5.
Journal of Statistical Software 19 Rule Additional Input Output Description 1+ P(Y|do(X),Z,W)Insertion of observations 1−P(Y|do(X),W\Z)Deletion of observations 2+ P(Y|do(X,Z),W\Z)Obs. to action exchange 2−P(Y|do(X\Z),Z,W)Action to obs. exchange 3+ P(Y|do(X,Z),W)Insertion of actions 3−P(Y|do(X\Z),W)Deletion of actions 4P(Y\Z|do(X),W)Marginalization 5P(Y\Z|do(X),Z,W)Conditioning 6+ P(Z|do(X),W\Z)P(Y,Z|do(X),W\Z)Chain rule multiplication 6−P(Z|do(X),Y,W)P(Y,Z|do(X),W)Chain rule multiplication 7+ P(Z|do(X),W)P(Y\Z|do(X),Z,W)Chain rule conditioning (numerator) 7−P(Z|do(X),W,Y\Z)P(Y\Z|do(X),W)Chain rule conditioning (numerator) 8+ P(Y,Z|do(X),W)P(Z|do(X),W,Y)Chain rule conditioning (denominator) 8−P(Y,Z|do(X),W\Z)P(Z|do(X),W)Chain rule conditioning (denominator) 9+ P(Y|do(X),W\RZ,R1 Z)Enable response indicators 9−P(Y\RZ,R1 Z|do(X),W)Enable response indicators 10+ P(Y|do(X),W\Z∗,Z(∗→t))Proxy variable exchange 10−P(Y\Z∗,Z(∗→t)|do(X),W)Proxy variable exchange Table 4: Extended set of rules for missing data problems used to manipulate input distributions of the form P(Y|do(X),W). Rules 1±,2±,3±,4,5and 6±are the same as in Table 2. For Rules 7±and 8±, the additional input has also been identified. The sets Y,Xand Ware disjoint. Sets Yand Wmay contain true variables, proxy variables and response indicators. Set Xmay only contain true variables and response indicators. The roles of the sets Zand RZdepend on the rule being applied (see Table 5). Rules 9±are used to enable response indicators, which then facilitates the use of Rules 10±. These last two rules exchange proxy variables to their true counterparts when the corresponding response indicators are enabled. For example, under the conditions specified in Table 5, Rule 9+ can be applied on P(Y, X∗|RX)to first obtain P(Y, X∗|R1 X)by enabling RX. Then, Rule 10+ can applied to this distribution to obtain P(Y, X |R1 X)by exchanging X∗ for X. Similarly to Table 3, Table 5outlines the valid subsets Zfor applying the extended rules of Table 4. A major difference to the original validity and termination conditions is the addition of the missing data condition that outlines the additional requirements that must be satisfied when missingness mechanisms are present. For the rules that are shared by Tables 2and 4, the missing data condition ensures that a true variable and its proxy counterpart never appear in the same term at the same time. For example, we cannot add an intervention on Xto P(X∗). It also ensures that we do not carry out summation over enabled response indicators in the case of rules 4 and 5. When applying Rules 9±, the condition also ensures that we do not attempt to enable a response indicator that is already enabled. For Rules 10±, the conditions guarantee that a proxy can only be exchanged to its true counterpart if its corresponding response indicator is enabled and present in the input term. Additional termination conditions also apply to the new rules and their correctness is easily verified. Lemma 2. Let Gbe a semi-Markovian graph and let Y,Xand Wbe disjoint subsets of V. Then all of the following are true:
20 Causal Effect Identification from Multiple Incomplete Data Sources Rule Validity cond. Missing data condition Term. cond. 1+ Z∩T=∅Z∩T(∗→t)∪T(t→∗)∪Z(∗→t)∪Z(t→∗)=∅ 1−Z⊆W W =∅ 2+ Z⊆W Z ∩W∗=∅W=∅ 2−Z⊆X X =∅ 3+ Z∩T=∅Z∩T(∗→t)∪T(t→∗)∪Z(∗→t)∪Z(t→∗)=∅ 3−Z⊆X X =∅ 4Z⊂Y Z ∩(Ra∩Y) = ∅ |Y|= 1 5Z⊂Y(Y\Z)∩(Ra∩Y) = ∅ |Y|= 1 6+ Z⊆W W =∅ 6−Z∩T=∅Z∩T(∗→t)∪T(t→∗)∪Z(∗→t)∪Z(t→∗)=∅ 7+ Z⊂Y|Y|= 1 7−Z⊂Y|Y|= 1 8+ Z∩T=∅ 8−Z⊆W W =∅ 9+ RZ⊆Wr,RZ∩Ra=∅Wr=∅ 9−RZ⊆Yr,RZ∩Ra=∅Yr=∅ 10+ Z∗⊆W∗,RZ(∗→t)⊆Ra,RZ(∗→t)⊆WrRa=∅ 10−Z∗⊆Y∗,RZ(∗→t)⊆Ra,(RZ(∗→t)⊆Wror RZ(∗→t)⊆Yr)Ra=∅ Table 5: The conditions for the enumerated subset Zfor applying the rules of Table 4to a term in the input column. Here T=Y∪X∪Wand the sets Y,Xand Ware those present in the input term P(Y|do(X),W). Active response indicators of the input are denoted by Ra. For Rules 6±,7±and 8±, the conditions specify valid variables of the second required term. Validity conditions for Rules 1±,2±,3±,4,5and 6±are the same as in Table 3. (i) If |Y|= 1, then Rules 7±of Table 4cannot be used. (ii) If W=∅, then Rule 8−of Table 4cannot be used. (iii) If Wr=∅then Rule 9+ of Table 4cannot be used. (iv) If Yr=∅then Rule 9−of Table 4cannot be used. (v) If Ra=∅, then Rules 10±of Table 4cannot be used. Proof. For (i), the set Yonly has a single vertex, so it cannot have a non-empty subset. For (ii), the set Wis empty so no subset Z⊂Wcan exist for the second input. For (iii), and the set Wris empty so no assignment to value 1can be performed. Similarly for (iv), the set Yris empty so no assignment to value 1can be performed. For (v) the set of active response indicators Rais empty, so no transformation from proxy variables to true variables via the missingness mechanism in Equation 2can take place. The task of selecting a suitable heuristic becomes more difficult when missing data are involved with the identifiability problem. The heuristic approach of Section 3.2 is no longer directly applicable due to the relation between proxy variables, response indicators and true variables. The proximity function considers Xand X∗as entirely different variables despite their connection and does not prefer the inclusion of response indicators. If the heuristic is applied as such, the search path will often involve a large number of manipulations which in turn leads to complicated expressions. For these reasons we do not apply a heuristic to
Journal of Statistical Software 21 missing data problems, but expand terms in the order in which they were identified. The improvements described in Section 3.2 still apply. It is straightforward to adapt do-search to the new extended set of rules. In the pseudocode shown in Algorithm 2, we simply replace all references to Tables 2and 3by references to Tables 4and Tables 5, respectively. When the validity condition is checked, we also verify that the missing data condition holds. Lemma 2guarantees the correctness of the new termination criteria. Theorem 1is also valid when the sets Aiare replaced by Ai∪A(∗→t) i, since it may be possible to exchange some proxy variable to a true variable that is present in the set Yof the target P(Y|do(X),W). 5. The dosearch package We implemented do-search (Algorithm 2) in C++ and constructed an Rinterface using the Rcpp package (Eddelbuettel and François 2011). This interface is provided by the Rpackage dosearch. Calling the search from Ris straightforward via the primary function that carries the name of package. dosearch(data, query, graph, transportability, selection_bias, missing_data, control) The required inputs of the function are data,query and graph. Parameter data is used to encode the set Pof known input distributions of Algorithm 2as a character string, where each distribution is separated by a new line. For example, if we have access to a set of distributions P={P(W), P (Y|X), P (Z|do(X), W )}, we would write R> data <- " + P(W) + P(Y|X) + P(Z|do(X),W) + " The do(·)-operator can either precede or succeed conditioning variables, but it must appear only once in a given term, meaning that expressions such as P(Y|do(A),B,do(C)) are not allowed, but should instead be given as P(Y|B,do(A,C)) or P(Y|do(A,C),B). If variable sets are desired, each member of the set has to be included explicitly. Parameter query is used to describe the target Qof Algorithm 2as a character string, similarly as the data. If we are interested in identifying P(Y|do(X), W )we would write R> query <- "P(Y|do(X),W)" Instead of describing distributions via text, it is also possible to use the following structure that encodes the role of each variable via a numeric vector: R> query <- c(Y = 0, X = 1, W = 2) Given a distribution of the form P(A|do(B),C)and a variable V, a value 0 means that V∈A, value 1 means that V∈Band value 2 means that V∈C. This format can also be used to input data as a list of numeric vectors:
22 Causal Effect Identification from Multiple Incomplete Data Sources R> data <- list( + c(W = 0), + c(Y = 0, X = 2), + c(Z=0,X=1,W=2) + ) Finally, graph encodes the semi-Markovian graph Gof the causal model as a character string with each edge on its own line. A directed edge from Xto Yis given as X -> Y and a bidirected edge between Xand Yis given as X <-> Y. Intervention nodes should not be given explicitly, since they are added automatically after calling dosearch. Furthermore, only vertices with incoming or outgoing edges should be included in graph. A variable with no connected edges can still appear in the input distributions and is automatically added to the graph as well. As an example, we can encode the graph of Figure 2(a) with an added bidirected edge between Xand Yas follows R> graph <- " + X -> Y + Z -> X + Z -> Y + X <-> Y + " Alternatively, one may use igraph graphs (Csardi and Nepusz 2006) in the syntax of the causaleffect package or DAGs created using the dagitty package. R> library("igraph") R> graph <- graph.formula(X -+ Y, Z -+ X, Z -+ Y, X -+ Y, Y -+ X) R> graph <- set.edge.attribute(graph, "description", 4:5, "U") R> library("dagitty") R> graph <- dagitty("dag{X -> Y; Z -> X; Z -> Y; X <-> Y}") The next two optional parameters of dosearch,transportability and selection_bias, are used to denote those vertices of Gthat should be understood as either transportability nodes or selection bias nodes, respectively. Providing these parameters may increase search performance in relevant problems. Both of these parameters should be given as character strings, where individual variables are separated by a comma, for example transportability = "S,T". Parameter missing_data, as the name suggests, is used to define missingness mechanisms 2as a character string, where individual mechanisms are separated by a comma. In order to describe that RXis the response indicator of Xwe would write R_X : X, which also implicitly defines that X* is the proxy variable of X. Proxy variables do not need to be manually described in graph as they are automatically constructed based on the missing_data argument. The list control can be used to set various additional parameters that are not directly related to the identifiability problem itself, but more so to the output of the search and other auxiliary details, such as benchmarking and obtaining derivations such as Figure 2(c). One such control parameter determines whether to use the search heuristic or not (heuristic = FALSE by default). Documentation of the dosearch package contains detailed information on the full list of control parameters.
Journal of Statistical Software 23 The return object of dosearch is a list with three components by default. The first component, identifiability, is a logical value that takes the value TRUE when the target distribution described by query is identifiable from the inputs of data. The second component, formula, is a character string describing the target distribution in terms of the inputs in L A T EX syntax if the target is identifiable. Otherwise this component is just an empty character string. The third component call contains the arguments of the original function call. 5.1. Simulations Here we report the results of a simulation study to assess the running time performance of dosearch and the impact of the search space reduction techniques as well as the search heuristic outlined in Section 3.2. Our synthetic simulation scenario consisted of 1000 semi-Markovian causal graphs of 10 vertices that were generated at random by first generating a random topological order of the vertices followed by a random lower triangular adjacency matrices for both directed and bidirected edges. Graphs without a directed path from Xto Ywere discarded. We sampled sequentially input distributions of the form P(A|do(B),C)at random by generating disjoint subsets such that Ais always non-empty. This was continued until the target quantity P(Y|do(X)) was found to be identifiable by the search. Then for each graph, we recorded the search times for the specific set of inputs that first resulted in the query to be identified and for the last set such that the target was non-identifiable. In other words, each graph generates two simulation instances, one for an identifiable query and one for a non-identifiable query. This setting directly corresponds to the setting of partially overlapping experimental data sets discussed in Section 2.2 for which no other algorithmic solutions exist. To understand the impact of the search heuristic and the various improvements, we compare four different search configurations: the basic do-search without the search heuristic or improvements1, one that only uses the search heuristic, one that only uses the improvements of Section 3.2 and one that uses them both. Figure 4shows the search times of the configurations compared to the basic configuration for identifiable instances. Most importantly, a vast majority of instances (96%) are solved faster than the basic configuration when both heuristics and improvements are used. The average search time with both heuristics and improvements enabled was 31.5seconds and 80.2seconds for the basic configuration. The search heuristic provides the greatest benefit for these instances as can be seen from Figure 4(b). Using a heuristic can sometimes hinder performance by leading the search astray and by causing additional computational steps through the evaluation of the proximity function. For example, there is a small number of instances where the search is over ten times slower than the basic configuration when using a heuristic. Fortunately, there are several instances in the opposite direction, where the heuristic provides over one hundred fold reduction in search time. Curiously, even using the improvements sometimes results in slower search times. This is most likely due to the elimination of Rule 1 of do-calculus, since it may be the case that the basic search is able to use this rule to reach the target distribution faster. More importantly, Figure 4(c) shows that the improvements clearly benefit the search. Furthermore, the benefit tends to increase as the instances get harder. 1In this configuration, terms are expanded in the order they were identified; the conditions in Table 3are not checked.
24 Causal Effect Identification from Multiple Incomplete Data Sources 0 100 200 300 400 500 0 100 200 300 400 500 Heuristic & Improvements (s) Basic (s) (a) 0 100 200 300 400 500 0 100 200 300 400 500 Heuristic only (s) Basic (s) (b) 0 100 200 300 400 500 0 100 200 300 400 500 Improvements only (s) Basic (s) (c) Figure 4: Scatter plots of the search times from identifiable instances under different search configurations compared to the basic do-search without a heuristic or improvements. 0 100 200 300 400 500 0 100 200 300 400 500 Heuristic & Improvements (s) Basic (s) (a) 0 100 200 300 400 500 0 100 200 300 400 500 Heuristic only (s) Basic (s) (b) 0 100 200 300 400 500 0 100 200 300 400 500 Improvements only (s) Basic (s) (c) Figure 5: Scatter plots of the search times from non-identifiable instances under different search configurations compared to the baseline configuration. Figure 5shows the search times of the configurations for non-identifiable instances. Relying only on a search heuristic provides no benefit here, as expected. The improvements to the search are most valuable for these instances, and in this scenario every non-identifiable instance was solved faster than baseline using the improvements, and when applied with the heuristic only one non-identifiable instance was slower than baseline. The average search time with both heuristic and improvements enabled was 134.6seconds and 182.5seconds for the basic configuration. The almost zero second instances are a result of Theorem 1when no search has to be performed in order to determine the instance to be non-identifiable. The benefit of the improvements tends to increase as the instances get harder also for these instances. Finally we examined the average run time performance of do-search, with all improvements and heuristics enabled. We replicated the previously described simulation scenario with the same number of instances (1000) for graphs with up to 10 vertices. Figure 6shows the boxplots of search times on a log-scale for graphs of different size, including both identifiable and non-identifiable instances. Note that for every graph size there are a number of easily
Journal of Statistical Software 31 9 5 110 0 17 29 15 0 274 10 0 0 63 0 0 P(X)P(Y | do(X)) P(Y | X)P(Y) (a) Graphs with arrow X→Y. 9 0 0 0 0 89 245 128 373 014 0 0 0 0 P(X)P(Y | do(X)) P(Y | X)P(Y) (b) Graphs where there is neither X→Ynor Y→X. Figure 10: Venn diagrams indicating the number of graphs were different distributions can be identified do-search. The intersection of P(X)and P(Y|X)shows the number of graphs were P(X, Y )can be identified. The total number of possible graphs is 3072 in both cases. The queries P(X, Y ),P(X),P(Y),P(Y|X)and P(Y|do(X)) were evaluated using dosearch in these 6144 graphs with the input distribution P(X∗, Y ∗, RX, RY). The results are summarized by Venn diagrams in Figure 10. The results are also available as a data set bivariate_missingness in the Rpackage dosearch. Using this data set we are able to showcase examples on non-identifiability and find interesting special cases by direct evaluation of all possible bivariate missingness graphs. The first example relates non-identifiability to the of the number of edges present in the graph. Example 1. Let Kdenote the number of edges in a bivariate missingness graph that does not have edge Y→X. The joint distribution P(X, Y )is not identifiable by do-search if K > 5, marginal distribution P(X)is not identifiable by do-search if K > 9, marginal distribution P(Y)and conditional distribution P(Y|X)are not identifiable by do-search if K > 8. The next example specifies the graph with the largest number of edges where both the joint distribution of Xand Yand the causal effect of Xon Ycan be identified. Example 2. The graph in Figure 11(a) is the only bivariate missingness graph that (i) has edge X→Y, (ii) has five edges, and (iii) allows for the identification of P(X, Y )and P(Y|do(X)) by do-search. The third example specifies the graph with the largest number of edges where the marginal distributions are identifiable while the joint distribution and the causal effect of Xon Yare non-identifiable. Example 3. The graph in Figure 11(b) is the only bivariate missingness graph that (i) has five edges, and (ii) allows for the identification of P(X)and P(Y), and (iii) does not allow for the identification of P(X, Y )or P(Y|do(X)) by do-search. No bivariate missingness graph that has more than five edges fulfills the conditions (ii) and (iii). Some interesting examples are shown in Figure 11. Graphs (a) and (b) are the unique graphs that fulfill the conditions specified in Examples 2and 3, respectively. Graph (c) is the graph
32 Causal Effect Identification from Multiple Incomplete Data Sources X Y RXRY (a) X Y RXRY (b) X Y RXRY (c) X Y RXRY (d) X Y RXRY (e) X Y RXRY (f) Figure 11: Missingness graphs used as example cases. Proxy variables are omitted for clarity. with the smallest number of edges where marginals P(X)and P(Y)can be identified but the joint distribution P(X, Y )or causal effect P(Y|do(X)) cannot be identified by do-search. In Graph (d), P(X),P(Y),P(X, Y )and P(Y|do(X)) are not identifiable by do-search but the conditional distribution P(Y|X)can be identified as follows P(Y|X) = P(Y|RY= 1)P(X|Y, RX= 1, RY= 1) PY0P(Y0|RY= 1)P(X|Y0, RX= 1, RY= 1).(3) In Equation 3, the numerator resembles the joint distribution P(X, Y |RX= 1, RY= 1) but is different because Yand RXare not independent. The denominator is the marginal of this pseudo joint distribution. In Graph (e), P(X),P(Y)and P(X, Y )are not identifiable by do-search but P(Y|X)and P(Y|do(X)) are identifiable and can be both estimated with Equation 3. In Graph (f), P(X, Y ),P(X)and P(Y|do(X)) are not identifiable by do-search but P(Y)and P(Y|X)can be identified as follows P(Y) = X RX,X∗ P(Y|X∗, RX, RY= 1)P(RX, X∗),(4) P(Y|X) = P(Y|X, RX= 1, RY= 1) In Equation 4, the summation also goes over the cases where X∗=NA and the distribution of Ymust be estimated also on the condition that Xis not observed. 6.5. Causal inference under case-control design Case-control design (Breslow 1996) is commonly used in epidemiology to study risk factors of rare diseases. In the basic setup, a fixed number of disease cases and a fixed number of controls are selected for the risk factor measurements. When the disease is rare, this design leads to substantial savings in the sample size compared to simple random sampling. Figure 12(a) shows the missingness graph for a situation where the inclusion to the study (indicator RY)
Journal of Statistical Software 33 X Y RY RX (a) Basic case-control design. X Z Y RY RXRZ (b) Case-control design for the front-door situation. Figure 12: Missingness graph for the case-control examples. depends on the disease endpoint Y. The risk factors Xare measured for the subset RY= 1 but occasionally the values are missing (indicator RX). It is immediately seen that neither the causal effect P(Y|do(X)) nor conditional distribution P(Y|X)can be identified because of the edge Y→RY. However, if the prevalence of the disease in the population, i.e., the marginal distribution P(Y), is known, the causal effect P(Y|do(X)) can be identified. The result is provided by do-search P(Y|do(X)) = P(Y)P(X|Y, RY= 1, RX= 1) PY0P(Y0)P(X|Y0, RY= 1, RX= 1).(5) In typical applications response Yis binary but in the non-parametric formula of Equation 5 response can be discrete or continuous. A more complicated example is shown in Figure 12(b) where the causal effect of risk factor Xon disease endpoint Yfulfills the front-door criterion (Pearl 1995) with respect to mediator Zand the data are collected from a case-control design where the selection depends Yand there is occasional item non-response in Xand Z. We observe data P(Y∗, X∗, Z∗, RY, RX, RZ)and know the marginal distribution P(Y)from other sources. Applying do-search we obtain the result P(Y|do(X)) = X Z"PY0P(Y0)P(X, Z |Y0, RX= 1, RY= 1, RZ= 1) PZ0,Y 0P(Y0)P(X, Z0|Y0, RX= 1, RY= 1, RZ= 1) × X X0 X Y0,Z0 P(Y0)P(X0, Z0|Y0, RX= 1, RY= 1, RZ= 1) × P(Y)P(X0, Z |Y, RX= 1, RY= 1, RZ= 1) PY0P(Y0)P(X0, Z |Y0, RX= 1, RY= 1, RZ= 1)!#. (6) Expression 6follows the general structure of the front-door adjustment P(Y|do(X)) = X Z P(Z|X)X X0 P(X0)P(Y|X0, Z),
34 Causal Effect Identification from Multiple Incomplete Data Sources where P(Z|X) = PY0P(Y0)P(X, Z |Y0, RX= 1, RY= 1, RZ= 1) PZ0,Y 0P(Y0)P(X, Z0|Y0, RX= 1, RY= 1, RZ= 1), P(X) = X Y0,Z0 P(Y0)P(X, Z0|Y0, RX= 1, RY= 1, RZ= 1), P(Y|X, Z) = P(Y)P(X, Z |Y, RX= 1, RY= 1, RZ= 1) PY0P(Y0)P(X, Z |Y0, RX= 1, RY= 1, RZ= 1). Note that P(X, Y, Z) = P(Y)P(X, Z |Y, RX= 1, RY= 1, RZ= 1). In (Karvanen 2015), a similar example was studied assuming that X,Zand Yare binary but in Expression 6there are no such restrictions. This factorization can be obtained in Ras follows R> data <- " + p(x*,y*,z*,r_x,r_y,r_z) + p(y) + " R> graph <- " + x -> z + z -> y + y -> r_y + x <-> y + r_y -> r_x + r_y -> r_z + r_y <-> r_x + r_y <-> r_z + r_z <-> r_x + " R> md <- "r_x : x, r_y : y, r_z : z" R> query1 <- "p(z|x)" R> query2 <- "p(x)" R> query3 <- "p(y|x,z)" R> dosearch(data, query1, graph, missing_data = md) \frac{\sum_{y}\left(p(y)p(x,z|r_x = 1,y,r_y = 1,r_z = 1)\right)} {\sum_{z} \sum_{y}\left(p(y)p(x,z|r_x = 1,y,r_y = 1,r_z = 1)\right)} R> dosearch(data, query2, graph, missing_data = md) \sum_{y,z}\left(p(y)p(x,z|r_x = 1,y,r_y = 1,r_z = 1)\right) R> dosearch(data, query3, graph, missing_data = md) \frac{\left(p(y)p(x,z|r_x = 1,y,r_y = 1,r_z = 1)\right)} {\sum_{y} \left(p(y)p(x,z|r_x = 1,y,r_y = 1,r_z = 1)\right)}
Journal of Statistical Software 35 7. Discussion The presented algorithm, do-search, removes the need for manual application of do-calculus, which is time-consuming and prone to errors. Systematic analyses such as the one in Section 6.4 are practically unreachable with manual application of do-calculus. Superiority of do-search over a simple forwards breadth-first search was attained through a combination of a search heuristic and a reduction of the search space. Some further approaches were attempted but later discarded as non-beneficial. These include caching separation criteria that hold in the graph after they are first evaluated, pre-computing valid subsets for each subset size and enumerating subsets in an order of increasing cardinality. As the simulations showed, our intuitive heuristic yielded significant improvements in search performance. The proximity function defined in Section 3.2 uses only the information contained in the distributions themselves. One approach could be to also take the structure of the graph into account in the proximity function. Further study is needed for finding a heuristic that performs well when missing data mechanisms are present in the graph. The scalability of do-search is limited due to vast search space of possibly identified causal effects. Currently, algorithms with polynomial complexity currently exist only for the simpler problems (see Table 1). However, based on the simulation results, do-search solves identifiability problems in graphs of ten vertices in under two minutes on average. By our observation, graphs typically analyzed in literature related to identifiability problems have fewer vertices. The theoretical computational complexity of the general form of the causal identifiability problem defined in Section 2remains an important and interesting question. The search could also be used to obtain formulas that are in some sense simpler than those produced by existing identifiability algorithms. A simplification algorithm by Tikka and Karvanen (2017b) functions as a post-processing step after the identifying formula has already been obtained by the ID algorithm. Given a measure of simplicity, the search heuristic could be adjusted to find simple formulas directly without resorting to separate simplification procedures. In some specific scenarios, such as the standard causal effect identifiability problem, an approach known as pruning (Tikka and Karvanen 2018) could be incorporated into the search. Pruning refers to the removal of vertices from the graph, that are not required for determining identifiability. Finally we note that identifiability has also been studied under the assumption that the functional relationships depicted by the causal model are linear (Angrist, Imbens, and Rubin 1996;Van der Zander and Liśkiewicz 2016;Chen, Kumor, and Bareinboim 2017) or nonparametric with additive error terms (Peters, Mooij, Janzing, and Schölkopf 2014;Peña and Bendtsen 2017) and when the causal graph is not completely known (Maathuis, Kalisch, and Bühlmann 2009;Entner, Hoyer, and Spirtes 2013;Hyttinen et al. 2015;Perković et al. 2015; Malinsky and Spirtes 2017;Jaber, Zhang, and Bareinboim 2018). Extending the search in these directions is an interesting line of future research. 8. Conclusion We presented do-search: a do-calculus based search capable of solving identifiability problems for which no known solutions exist. This contribution is especially useful for researchers working in the field of causal inference to confirm theoretical results or to find counterexamples to identifiability claims. In practical terms, the search can also provide solutions to complicated
36 Causal Effect Identification from Multiple Incomplete Data Sources problems such as combining transportability and selection bias, recovering from multiple bias sources or identifying causal quantities in the presence of missing data that cannot be solved by any other existing method. The Rpackage dosearch providing an implementation of do-search is available on CRAN. Acknowledgments This work belongs to the thematic research area “Decision analytics utilizing causal models and multiobjective optimization” (DEMO) supported by Academy of Finland (grant number 311877). AH was supported by Academy of Finland through grant 295673. The authors wish to acknowledge CSC – IT Center for Science, Finland, for computational resources. References Angrist JD, Imbens GW, Rubin DB (1996). “Identification of Causal Effects Using Instrumental Variables.” Journal of the American Statistical Association,91(434), 444–455. doi: 10.2307/2291629. Bareinboim E, Pearl J (2012a). “Causal Inference by Surrogate Experiments: z- Identifiability.” In N de Freitas, K Murphy (eds.), Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, pp. 113–120. AUAI Press. Bareinboim E, Pearl J (2012b). “Controlling Selection Bias in Causal Inference.” In ND Lawrence, M Girolami (eds.), Proceedings of the 15th International Conference on Artificial Intelligence and Statistics, volume 22, pp. 100–108. Bareinboim E, Pearl J (2013). “A General Algorithm for Deciding Transportability of Experimental Results.” Journal of Causal Inference,1, 107–134. doi:10.1515/jci-2012-0004. Bareinboim E, Pearl J (2014). “Transportability from Multiple Environments with Limited Experiments: Completeness Results.” In Proceedings of the 27th Annual Conference on Neural Information Processing Systems, pp. 280–288. Bareinboim E, Tian J (2015). “Recovering Causal Effects from Selection Bias.” In Proceedings of the 29th AAAI Conference on Artificial Intelligence, pp. 3475–3481. Bareinboim E, Tian J, Pearl J (2014). “Recovering from Selection Bias in Causal and Statistical Inference.” In Proceedings of the 28th AAAI Conference on Neural Information Processing Systems. Bhattacharya R, Nabi R, Shpitser I, Robins JM (2019). “Identification in Missing Data Models Represented by Directed Acyclic Graphs.” In Proceedings of the 35th Conference on Uncertainty in Artificial Intelligence. Breslow NE (1996). “Statistics in Epidemiology: The Case-Control Study.” Journal of the American Statistical Association,91(433), 14–28. doi:10.2307/2291379.
Journal of Statistical Software 37 Chen B, Kumor D, Bareinboim E (2017). “Identification and Model Testing in Linear Structural Equation Models Using Auxiliary Variables.” In D Precup, YW Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70, pp. 757–766. Correa J, Bareinboim E (2017). “Causal Effect Identification by Adjustment under Confounding and Selection Biases.” In Proceedings of the 31st AAAI Conference on Artificial Intelligence. Correa J, Tian J, Bareinboim E (2018). “Generalized Adjustment under Confounding and Selection Biases.” In Proceedings of the 32nd AAAI Conference on Artificial Intelligence. Csardi G, Nepusz T (2006). “The igraph Software Package for Complex Network Research.” InterJournal,Complex Systems, 1695. Danks D, Glymour C, Tillman RE (2009). “Integrating Locally Learned Causal Structures with Overlapping Variables.” In Advances in Neural Information Processing Systems, pp. 1665–1672. Dawid AP (2002). “Influence Diagrams for Causal Modelling and Inference.” International Statistical Review,70(2), 161–189. doi:10.2307/1403901. Eddelbuettel D, François R (2011). “Rcpp: Seamless Rand C++ Integration.” Journal of Statistical Software,40(8), 1–18. doi:10.18637/jss.v040.i08. Entner D, Hoyer P, Spirtes P (2013). “Data-Driven Covariate Selection for Nonparametric Estimation of Causal Effects.” In Proceedings of the 16th International Conference on Artificial Intelligence and Statistics, volume 31, pp. 256–264. PMLR. Greenland S, Robins JM, Pearl J (1999). “Confounding and Collapsibility in Causal Inference.” Statistical Science,14(1), 29–46. doi:10.1214/ss/1009211805. Huang Y, Valtorta M (2006a). “Identifiability in Causal Bayesian Networks: A Sound and Complete Algorithm.” In Proceedings of the 21st National Conference on Artificial Intelligence – Volume 2, pp. 1149–1154. AAAI Press. Huang Y, Valtorta M (2006b). “Pearl’s Calculus of Intervention Is Complete.” In Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence, pp. 217–224. AUAI Press. Hyttinen A, Eberhardt F, Hoyer PO (2012). “Causal Discovery of Linear Cyclic Models from Multiple Experimental Data Sets with Overlapping Variables.” In Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, pp. 387–396. Hyttinen A, Eberhardt F, Järvisalo M (2015). “Do-Calculus When the True Graph Is Unknown.” In Proceedings of the 31st Conference on Uncertainty in Artificial Intelligence, pp. 395–404. AUAI Press. Jaber A, Zhang J, Bareinboim E (2018). “Causal Identification under Markov Equivalence.” In Proceedings of the 34th Conference on Uncertainty in Artificial Intelligence, pp. 978–987. AUAI Press. Kalisch M, Mächler M, Colombo D, Maathuis MH, Bühlmann P (2012). “Causal Inference Using Graphical Models with the RPackage pcalg.” Journal of Statistical Software,47(11), 1–26. doi:10.18637/jss.v047.i11.
38 Causal Effect Identification from Multiple Incomplete Data Sources Karvanen J (2015). “Study Design in Causal Models.” Scandinavian Journal of Statistics, 42(2), 361–377. doi:10.1111/sjos.12110. Koller D, Friedman N (2009). Probabilistic Graphical Models: Principles and Techniques. MIT Press. Lauritzen SL (2000). “Causal Inference from Graphical Models.” In OE Barndorff-Nielsen, DR Cox, C Klüppelberg (eds.), Complex Stochastic Systems, pp. 67–107. Chapman & Hall/CRC. doi:10.1201/9781420035988. Lee S, Correa J, Bareinboim E (2019). “General Identifiability with Arbitrary Surrogate Experiments.” In Proceedings of the 35th Conference on Uncertainty in Artificial Intelligence. Little RJA, Rubin DB (1986). Statistical Analysis with Missing Data. John Wiley & Sons, New York. Maathuis MH, Colombo D (2015). “A Generalized Backdoor Criterion.” The Annals of Statistics, pp. 1060–1088. doi:10.1214/14-aos1295. Maathuis MH, Kalisch M, Bühlmann P (2009). “Estimating High-Dimensional Intervention Effects from Observational Data.” The Annals of Statistics,37(6A), 3133–3164. doi: 10.1214/09-aos685. Malinsky D, Spirtes P (2017). “Estimating Bounds on Causal Effects in High-Dimensional and Possibly Confounded Systems.” International Journal of Approximate Reasoning,88, 371–384. doi:10.1016/j.ijar.2017.06.005. Mohan K, Pearl J (2018). “Graphical Models for Processing Missing Data.” arXiv: 1801.03583 [stat.ME], URL https://arxiv.org/abs/1801.03583. Mohan K, Pearl J, Tian J (2013). “Graphical Models for Inference with Missing Data.” In Proceedings of the 26th International Conference on Neural Information Processing Systems, pp. 1277–1285. Pearl J (1995). “Causal Diagrams for Empirical Research.” Biometrika,82(4), 669–688. doi:10.2307/2337329. Pearl J (2009). Causality: Models, Reasoning, and Inference. 2nd edition. Cambridge University Press. Peña JM, Bendtsen M (2017). “Causal Effect Identification in Acyclic Directed Mixed Graphs and Gated Models.” International Journal of Approximate Reasoning,90, 56–75. doi: 10.1016/j.ijar.2017.06.015. Perković E, Textor J, Kalisch M, Maathuis M (2015). “A Complete Generalized Adjustment Criterion.” In Proceedings of the 31st Conference on Uncertainty in Artificial Intelligence, pp. 682–691. AUAI Press. Peters J, Mooij JM, Janzing D, Schölkopf B (2014). “Causal Discovery with Continuous Additive Noise Models.” Journal of Machine Learning Research,15, 2009–2053. RCore Team (2021). R: A Language and Environment for Statistical Computing.RFoundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
Journal of Statistical Software 39 Richardson T (2003). “Markov Properties for Acyclic Directed Mixed Graphs.” Scandinavian Journal of Statistics,30(1), 145–157. doi:10.1111/1467-9469.00323. Sharma A, Kiciman E (2019). DoWhy: A Python Package for Causal Inference. URL https://github.com/microsoft/dowhy. Shpitser I, Mohan K, Pearl J (2015). “Missing Data as a Causal and Probabilistic Problem.” In M Meila, T Heskes (eds.), Proceedings of the 31st Conference on Uncertainty in Artificial Intelligence, pp. 802–811. AUAI Press. Shpitser I, Pearl J (2006a). “Identification of Conditional Interventional Distributions.” In Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence, pp. 437–444. AUAI Press. Shpitser I, Pearl J (2006b). “Identification of Joint Interventional Distributions in Recursive Semi-Markovian Causal Models.” In Proceedings of the 21st National Conference on Artificial Intelligence – Volume 2, pp. 1219–1226. AAAI Press. Shpitser I, Pearl J (2008). “Complete Identification Methods for the Causal Hierarchy.” Journal of Machine Learning Research,9, 1941–1979. Spirtes P, Glymour C, Scheines R (1993). Causation, Prediction, and Search. 2nd edition. Springer-Verlag, New York. doi:10.1007/978-1-4612-2748-9. Textor J, Van der Zander B, Gilthorpe MS, Liśkiewicz M, Ellison GTH (2016). “Robust Causal Inference Using Directed Acyclic Graphs: The Rpackage dagitty.” International Journal of Epidemiology,45(6), 1887–1894. doi:10.1093/ije/dyw341. Tikka S, Hyttinen A, Karvanen J (2021). dosearch: Causal Effect Identification from Multiple Incomplete Data Sources.Rpackage version 1.0.8, URL https://CRAN.R-project.org/ package=dosearch. Tikka S, Karvanen J (2017a). “Identifying Causal Effects with the RPackage causaleffect.” Journal of Statistical Software,76(12), 1–30. doi:10.18637/jss.v076.i12. Tikka S, Karvanen J (2017b). “Simplifying Probabilistic Expressions in Causal Inference.” Journal of Machine Learning Research,18(36), 1–30. Tikka S, Karvanen J (2018). “Enhancing Identification of Causal Effects by Pruning.” Journal of Machine Learning Research,18(194), 1–23. Tikka S, Karvanen J (2019). “Surrogate Outcomes and Transportability.” International Journal of Approximate Reasoning,108, 21–37. doi:10.1016/j.ijar.2019.02.007. Tillman R, Spirtes P (2011). “Learning Equivalence Classes of Acyclic Models with Latent and Selection Variables from Multiple Datasets with Overlapping Variables.” In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, pp. 3–15. Triantafillou S, Tsamardinos I (2015). “Constraint-Based Causal Discovery from Multiple Interventions over Overlapping Variable Sets.” Journal of Machine Learning Research,16, 2147–2205.
40 Causal Effect Identification from Multiple Incomplete Data Sources Triantafillou S, Tsamardinos I, Tollis I (2010). “Learning Causal Structure from Overlapping Variable Sets.” In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics, pp. 860–867. Van der Zander B, Liśkiewicz M (2016). “On Searching for Generalized Instrumental Variables.” In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics. Van der Zander B, Liśkiewicz M, Textor J (2019). “Separators and Adjustment Sets in Causal Graphs: Complete Criteria and an Algorithmic Framework.” Artificial Intelligence,270, 1–40. doi:10.1016/j.artint.2018.12.006. Affiliation: Santtu Tikka Department of Mathematics and Statistics Faculty of Mathematics and Science University of Jyvaskyla P.O. Box 35, FI-40014, Finland E-mail: [email protected] Journal of Statistical Software http://www.jstatsoft.org/ published by the Foundation for Open Access Statistics http://www.foastat.org/ August 2021, Volume 99, Issue 5 Submitted: 2019-12-05 doi:10.18637/jss.v099.i05 Accepted: 2020-10-26