{'fraction_non_alphanumeric': 0.03375751148815836, 'fraction_numerical': 0.014391758824420542, 'mean_word_length': 4.447256223353047, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Generalized Causal Dantzig: A Unified Approach to Instruments and Environments

Many recent works have proposed regression models which are invariant across data collection environments [Rothenh\"ausler et al., 2019, Peters et al., 2016, Heinze-Deml et al., 2018, Meinshausen, 2018, Gimenez andRothenh\"ausler, 2021]. Under conditions on the environments and type of invariance imposed, these estimators often have a causal interpretation. One recent example is the Causal Dantzig (CD). In this work we derive the CD as generalized method of moment (GMM) estimator. In this form, the environment plays a role nearly identical to the instrument in classical estimators such as Two Stage Least Squares (TSLS), illustrating a close connection between the concepts of instruments, environments, and invariance. We show that several of the conceptual motivations behind environments such as do--interventions can be modeled with instrumental variables. This unified treatment of environments and instruments produces many practical results including: 1) immediate generalization of the Causal Dantzig to problems with continuous instruments/environments 2) straightforward asymptotic results based on GMM theory and 3) new hybrid estimators which have properties superior to CD or TSLS alone. We illustrate these results in simulations and an application to a Flow Cytometry data set.


Introduction
Causal inference is challenging because of confounding and reverse causality. One solution is to make strong assumptions about confounding (e.g. no hidden confounding) and the direction of causation (e.g. X is a cause of Y and not the reverse). Under these assumptions, causal parameters may be identifiable from observational data.
When these assumptions are not valid, instrumental variables are a classical method for identifying causal effects. The variable E is an instrument for the X → Y causal relation if 1) E is uncorrelated with the error term in the Y on X regression (exclusion condition) and 2) E is correlated with X (valid first stage). Instrumental variables methods such as Two Stage Least Squares (TSLS) remain consistent under hidden confounding and unknown direction of causality. IV methods date back to Wright [1928]. IV estimators have been generalized to high dimensional problems [Lin et al., 2015, Gold et al., 2020, Belloni et al., 2012 and causal discovery applications where X ∈ R p is a vector and identifying the causes of each X i is of interest [Chen et al., 2018].
Recently, several works have proposed causal estimators based on the concept of data collection environment [Rothenhäusler et al., 2019, Heinze-Deml et al., 2018, Meinshausen, 2018, Gimenez and Rothenhäusler, 2021.  introduced the concept of data collection environment and developed a causal estimator, Invariant Causal Prediction (ICP). In this framework, each observation is collected in an environment. The environment may represent randomized experiments on some of the exposures of interest, shift, and/or noise interventions. Environments are typically discrete and often small in number (e.g. 2 or 3).
Estimators are constructed from environments based on the principle that parameters in a causal regression model Y on X should be invariant across environments while parameters in a merely associational model will vary. As a simple heuristic example, suppose we are interested in estimating the causal effect of X on Y . In truth Y is a cause of X and the true causal effect of X on Y is 0. Standard regression based estimators are inconsistent. More generally with purely observational data it will be impossible to determine the causal effect. However if we have data from two environments, e.g. an observational environment and an interventional environment where noise is added to X, then it is possible (under some conditions) to infer the causal effect as 0 by noting that the distribution of Y is identical in the observational and interventional environment. This would not be the case if X has a causal effect on Y .
The original environment estimator ICP has been generalized to problems with sequential data and non-linear models [Pfister et al., 2019, Heinze-Deml et al., 2018. Rothenhäusler et al. [2019] proposed the Causal Dantzig (CD) environment estimator to address two weaknesses of ICP: computational complexity and inconsistency under hidden confounding. While ICP requires fitting models on all subsets of the exposure variables (making the algorithm superexponential in the number of exposures), the CD estimator has computational burden similar to linear regression. Further CD is consistent when hidden variables confound the X → Y causal relation.
Various types of environments have been used in applications. In gene expression data sets, ICP was fit on unperturbed wild type samples (environment 1) and knockout samples where expression of a gene was set to 0 (environment 2) . In an application to flow cytometry data, estimators were fit to measure cause and effect relations among biochemical agents . Here the environment represented various reagents added to the system which inhibited or stimulated the biochemical agents. Other applications of environment estimators have used distance of subject to nearest college (binarized to close or far)  and continent on which observation was collected [Heinze-Deml et al., 2018].
The relationship between instrumental variables and environments has been discussed in previous works. Rothenhäusler et al. [2019] performed limited simulations comparing the CD with standard instrumental variable estimators such as TSLS but viewed the methods as "loosely related." Heinze-Deml et al. [2018] stated that environments and instruments differ because 1) in instrumental variable applications the direction of causality is generally known while for environmental estimators the goal is causal discovery 2) with a single environmental variable causal effects can be identified while IV methods require that the number of instruments equals the number of exposures. Gimenez and Rothenhäusler [2021] formalized a definition of environments by equating an environment with a DAG. The set of environmental DAGs are related because the causal coefficients connecting a response Y with exposures X must be invariant across DAGs. However the internal causal structure of X can vary across DAGs. Within an given environment, instrumental variables, regression adjustment, and randomization can be used to construct moment conditions for a GMM estimator. In Gimenez and Rothenhäusler [2021] environments must be discrete and GMM moment conditions induced by environments cannot be mixed with moment conditions induced by other methods (e.g. instruments or randomization).
In this work, we develop connections between Instrumental Variable (IV) estimators and the Causal Dantzig (CD), an environment estimator. First we represent the CD as a generalized method of moment (GMM) estimator. In the GMM representation, environments induce moment constraints on the estimator. The GMM representation enables application of the CD to problems with continuous environments and provides a straightforward method for optimal weighting of estimator constraints in the over-identified case (which occurs whenever there are more than two data collection environments). We term this new estimator the Generalized Causal Dantzig (GCD) since it exactly matches the CD in the two environment case but broadens the settings to which the CD can be applied.
These results have conceptual implications which closely link environments with instruments. Specifically since IV estimators such as TSLS are also GMMs, we can compare the moment constraints of TSLS and GCD. In the GMM representation, the environment in the GCD plays a role nearly identical to the instrument in IV estimators. The particular type of estimator to use (GCD, TSLS, or something else) depends on how the instruments/environments effect the exposures. Conceptually equating instruments and environments leads to practical results. For example we construct a hybrid GCD-IV estimator which imposes both GCD and IV constraints on the causal estimator. Under some conditions, the resulting hybrid estimator has better performance than either method individually. Asymptotic results for these estimators can be derived based on standard GMM theory.
Examples and applications in this manuscript further connect instruments with environments. We show that interventions on exposures, one of the original motivations for the creation of environments in , can be modeled with instruments and causal estimators constructed using TSLS. IV methods have been considered unsuitable for causal discovery problems Heinze-Deml et al. [2018]. We compare the GCD to IV estimators for causal discovery with Flow Cytometry Data, demonstrating that IV models are suitable for data sets previously only studied with environment based estimators.
This work is organized as follows. In Section 2 we review the GMM representation of IV estimators and the Causal Dantzig estimator. In Section 3 we propose the Generalized Causal Dantzig (GCD), a GMM estimator. We show that the GCD is identical to the CD estimator in the two environment case while increasing the set of problem to which is can be applied (e.g. continuous environments). Section 4 derives asymptotic results for the GCD based on the GMM representation of the estimator. We compare consistency of IV and GCD for different data models. Section 5 contains simulations which demonstrate some of the potential applications of the GCD and hybrid GCD-IV estimators. In Section 6 we apply IV, the CD, GCD, and IV-GCD hybrid estimators to flow cytometry data of Sachs et al. [2005]. In several cases, we show that IV and hybrid GCD-IV estimators identify more plausible causal relations than the CD alone. We conclude with a discussion in Section 7.

Instrumental Variables and the Causal Dantzig
Let X ∈ R p be a set of exposures and Y ∈ R 1 be a response. The goal is to estimate the causal effect of X on Y . Consider a linear model of the form Under a potential outcomes [Angrist et al., 1996] or a structural equation modelling [Pearl et al., 2009] framework, β j can be given a causal interpretation as the average treatment effect (ATE) of X j on Y when shifting X j by 1 unit. In either of these frameworks, correlation between X and δ Y is induced by hidden confounders which exert a causal effect on X and Y . Straightforward regression of Y on X may result in inconsistent estimates of β when the error term δ Y is correlated with X.

Instrumental Variables Estimators
Instrumental variables techniques, dating back to Wright [1928], use instrumental variables (IVs) E ∈ R q to construct consistent estimates of β in the presence of hidden confounding. Suppose that 1) the instruments E are uncorrelated with the error term δ Y (E[Eδ Y ] = 0) and 2) E[EX T ] ∈ R q×p is of rank at least p. The latter condition implies that q ≥ p (i.e. there are at least as many instruments as exposures). We review the construction of IV estimators from a GMM perspective. See Mátyás et al. [1999] for more background.
Let Z = (Y, X, E) and g(Z, β) = E(Y − X T β). Then the true causal parameter β 0 is the unique root of the function This can be seen by noting The rank condition implies that the null-space of the matrix is 0 implying β 0 is the only solution. To construct a consistent estimator, the expectation is approximated with a sample. Define X ∈ R n×p , E ∈ R n×q , Y ∈ R n×1 to be a matrices of n i.i.d. observations. Letting i index the observation we have When q > p, there will typically be no β such that m( β) = 0 in Equation (3) (because q constraints and p unknowns). In this case, the standard GMM approach is to use estimator where W 0 is a positive definite weighting matrix. The TSLS IV estimator uses This weight matrix is chosen for asymptotic efficiency considerations which we discuss further in Section 4.2 (see also Section 1.3.4.2 of Mátyás et al. [1999]). With W , Equation (4) has the form The TSLS estimator derives its name from the fact that it is computed by first regressing X on E (first stage) and then regressing the predicted values from this regression on Y (second stage).
Note that when p = q (just identified case) the unique β IV ( W ) does not depend on W and has the form

Causal Dantzig
The Causal Dantzig (CD) uses environments to estimate β in Equation (1). Each observation belongs to one of a discrete set of environments. There must be at least two data collection environments to fit the CD. While environments were originally introduced as being discrete , Heinze-Deml et al. [2018] generalized the Invariant Causal Prediction (ICP) estimator to cases where the environment is a continuous variable. One contribution of our work is to do the same for the Causal Dantzig.
Let E be a set of data collection environments. Let X e (Y e ) denote exposures (response) collected in environment e ∈ E. For any f, g ∈ E, the CD seeks a β which satisfies Since X e ∈ R p , when r ≡ #E = 2 (two data collection environments), the invariances specified in Equation (6) produce p constraints on β ∈ R p which will typically (under some rank conditions) leads to identifiability of β.
Specifically suppose there are n j observations from environment j. Let X e ∈ R ne×p (Y e ∈ R ne ) represent the design matrix (response vector) for environment e. Then the sample version of constraints in Equation (6) is Solving for β one obtains assuming the inverse exists (see Equation 7 of Rothenhäusler et al. [2019]). The CD is a consistent and asymptotically normal estimator of β under conditions that dictate how the distribution of (X e , Y e ) changes with the environment (see Theorem 1 and 2 of Rothenhäusler et al. [2019]). We discuss these issues further in Section 4. Here we focus on relating the estimator to TSLS.

Generalized Causal Dantzig
Define the Generalized Causal Dantzig (GCD) using the GMM Here E ∈ R q and vec(A) vectorizes (stacks columns) the matrix A [Henderson and Searle, 1981]. We now justify the name Generalized Causal Dantzig by showing an equivalence between Equation (8) and Equation (6). First, by viewing the environment E as a random variable one can rewrite the original CD invariance constraints as for all e, g.
for j ∈ {1, . . . , q} and select e j1 and e j0 such that each E j has mean 0, i.e. n −1 n i=1 E ij . For example, in the two environment case E is one-dimensional with value e 1 for observations in environment e and e 0 for observations in environment f . We have the following results. (10), the Causal Dantzig invariance constraint in Equation (9) and the constraint m GCD (β) = 0 (Equation (8)) are identical.

Theorem 1 Under the environment coding specified in Equation
See Section 8.1 for a proof. The result has conceptual and practical implications. On the conceptual side, comparing the IV moment constraints (Equation (2)) with the GCD moments constraints (Equation (9)) shows the environment and instrument (E) play essentially identical roles in the estimators. TSLS requires each instrument/environment to be orthogonal to Y − X T β while CD requires each instrument/environment be orthogonal to each element of X(Y − Xβ). On a practical side, the GCD provides a natural generalization of the CD to problems with continuous environments/instruments and GMM theory enables straightforward derivation of GCD asymptotics. This includes optimal weighting of invariance (equivalently moment) criteria in the overidentified case using a two-step estimator. We explore these idea further in Sections 4 and 5.
We now construct the GCD estimator by imposing the constraints in Equation (8) The GMM estimator is then where W 0 is some weighting matrix. When E is constructed from two environments, its dimension is 1 because q = r − 1 = 1. In this case the qp = p constraints just identify β. Further β GCD ( W ) is invariant to different choices of W and identical to the original Causal Dantzig. The following theorem formalizes these results.
Theorem 2 Suppose X T (E • X) ∈ R p×pq has column rank p. (12) is

The minimizer in Equation
3. When E is constructed from two environments following Equation (10), β GCD = β CD .
See Section 8.2 for a proof. With more than two environments, β GCD ( W ) will generally not be equivalent to the r > 2 CD estimators proposed in Rothenhäusler et al. [2019]. We discuss optimal selection of W in Section 4.2.

Asymptotic Properties of GCD and Comparison with TSLS
The GMM representation of the Generalized Causal Dantzig makes derivation of asymptotic properties straightforward. We first discuss consistency and then asymptotic normality.

Assumptions 1 Suppose (a) m(β) exists and is finite for all
If m IV satisfies Assumptions 1 then β IV ( W ) is consistent. If m GCD satisfies Assumptions 1 then β GCD ( W ) is consistent. See Theorem 1.1 and Section 1.3.4.1 of Mátyás et al. [1999] for a proof and application to the i.i.d. case.
Condition b) in Assumptions 1 can be divided into two components: i) validity m(β 0 ) = 0 which restricts how the environment/instrument effects the exposures X and ii) identifiability m(β) = 0 for all β = β 0 which, roughly speaking, requires that the instruments contain sufficient information to uniquely identify the true causal parameter. The reason for a violation of condition b) (whether i or ii does not hold) is important because when an estimator fails identifiability (i.e. when ii does not hold), the moment conditions of the estimator may be augmented with additional moment conditions to produce a consistent estimator. We now discuss several models and verify whether condition b) holds and if not whether the violation is of form i) or ii). These examples demonstrate the strengths and weakness of the GCD and IV as well as illustrate settings where hybrid estimators may be of interest. These hybrid estimators are considered further in Section 5.3. Mathematical details for these examples are provided in Section 8.3.
Comparison of GCD and IV Consistency for Various Models: • Instrument Changes Exposure Mean Let • Instrument Changes Exposure Variance Consider the same response model for Y as in Equation (13) but exposure model In this model, α v = 0 and α 0 are unknown parameters with the restriction that min α v E + α 0 > 0 (min taken across range of E). The instrument/environment E alters the variance of X but not its mean. For example, E could be a measurement of experimental noise with larger E believed to produce larger variance in X (with α v > 0). Condition b) holds for GCD but not for IV because m IV (β) = 0 for all β. This is because m IV is only sensitive to shifts in the mean of exposures and E only shifts the variance.
• Instrument Changes Mean and Variance Potentially the environment/instrument effects both the mean and variance of the exposure X. In this case This is essentially a heteroskedastic linear regression of X on E. When α v = 0 and R = 0, this is the Mean Shift Case and IV is generally preferred. If α v = 0 and R = 0 this is the Noise Shift case and GCD is preferred. If it is unknown whether R or α v could be 0, it is possible to construct hybrid GMM estimators which are consistent whenever IV or GCD is consistent. Define This estimator imposes both IV and GCD invariances. Condition b) will be satisfied by m H (β) whenever it is satisfied for either m IV or m GCD . In particular this occurs if R = 0 or α v = 0. Further this hybrid estimator generally has lower asymptotic variance than either method used individually. We compare the Hybrid estimator with the GCD and IV in a simulation in Section 5.3.
• Instrument Represents Hard (do) Interventions Suppose one records data from two environments: an observational environment where X is not perturbed by any external force and an interventional environment where X is set to some particular value x. Following the Pearl framework for do operators, we could consider observations (X, Y ) being generated from either p(X, Y ) or p(X, Y |do(X = x)) [Pearl et al., 2009]. The observational environment data is generated from structural equation model (SEM) This SEM may be encoded with the DAG in Figure 1 a). The interventional distribution p(X, Y |do(X = x)) is then represented by the mutilated DAG in Figure 1 b) where the arrow from h to X has been removed. The SEM for this mutilated DAG is This type of mixed data was one of the original motivations for the creation of environments ]. One can model mixed data generation using an instrument/environment E with value e 1 for observations generated from the interventional environment p(X, Y |do(X = x)) and e 0 for observations generated from the observational environment p(X, Y ). This is represented by the DAG in Figure 1 c).
Condition b) is satisfied for IV assuming x = 0. This is equivalent to E[X|E = e 1 ] = E[X|E = e 0 ] (i.e. the intervention sets X to a value different from the observational mean of X). Rothenhäusler et al.
[2019] noted the CD is generally not consistent for such interventions. Specifically the GCD does not satisfy condition b) for reason i).

Asymptotic Normality
Asymptotic normality of the GCD can be derived from standard GMM theory. The asymptotic theory provides guidance on selection of the weight matrix W in the overidentified case (recall that overidentification will occur whenever there are more than two environments or more generally when the dimension of E is greater than 1). Since all positive definite weight matrices produce consistent estimates, the optimal weight matrix is chosen to minimize the asymptotic variance. For the GCD, this optimal weight matrix can be estimated using a GMM two-step procedure.
Under Assumptions 1 and 2, β IV ( W ) and β GCD ( W ) are asymptotically normal. The asymptotic variance is For the instrumental variables estimator is a consistent estimator of W and thus is an asymptotically optimal weighting for the IV estimator. The estimator β IV ( W ) can be computed using a set of two regressions, giving it the name Two Stage Least Squares. Since consistency of β IV only requires orthogonality of E and δ X , there may be cases where β IV (W ) is a consistent, asymptotically normal estimate of β but W = E[EE T ] −1 is not asymptotically efficient. In these cases, an asymptotically efficient IV estimator can be constructed assuming one can construct a consistent estimate ofW . One possibility is to use two-step procedures. First a pilot estimator β IV (W ) is computed using some initial weight matrix W . Possible choices include W = I (identity) or W = W (TSLS weight). Residuals are defined as δ X,i = Y i − X T i β IV (W ). Define Σ as a diagonal matrix with Σ ii = δ 2 X,i and If W T S → PW , then β IV ( W T S ) is asymptotically efficient. This two-step procedure is sometimes referred to as optimal GMM. See Section 6.4.2 of Cameron and Trivedi [2005] for a discussion of two-step optimal GMM estimators and comparison with TSLS.
For the GCD, the asymptotically optimal estimators can be constructed from two-step procedures, following the same strategy as used for IV. The following theorem provides formal justification of this approach. Note that this is only necessary in the over-identified case since in the just identified case the estimator is invariant to different choices of W .

Theorem 3 Suppose Assumptions 1 and 2 hold. Let W 0 be some initial weight matrix such that
X,i and define Then β GCD ( W GCD ) is asymptotically efficient (i.e. its variance is given in Equation (21)).
See Section 8.4 for a proof. One can consistently estimate the asymptotic variance by estimating M with Then we have

Simulations
We demonstrate some of the applications of the GCD and Hybrid estimators in simulations.

GCD with Continuous Instruments
We fit the GCD to a model with continuous environments/instruments. Consider the Noise Shift Model of Equation (14) with the following parameters The random variables h, E, X , Y are all independent. IV is not consistent for this model while GCD is consistent. With univariate E and X the GCD is The CD is not directly applicable here because the environment is continuous. One could discretize E with some function e : R → {0, 1} and then apply the CD using environment e(E). We consider this approach with e(E i ) = 1 Ei>median(Ei) (environment is 1 if E i is greater than sample median of E values). We simulate N = 1000 times and plot sampling distributions of the Generalized Causal Dantzig (GCD), the Causal Dantzig (CD), and Ordinary Least Squares (OLS) in Figure 2. Note that E centered (mean shifted to 0 in the sample) before the GCD is fit. OLS is inconsistent due to hidden confounding. The GCD and CD sampling distributions are both centered at the true causal effect of 1. The GCD empirical sampling distribution is more concentrated around the causal effect. The GCD is also easier to fit in that it does not require selection of the function e to binarize the continuous variable E into discrete environments.

GCD in Overidentified Case
We now fit the GCD in the overidentified case. This will happen whenever there is more than one instrument/environment. The data generation follows the structural equation model:  All exogenous variables (h, 1 , 2 , 3 , y ) are standard normal. The true parameter value is β 0 = (0, 1, 0) because only X 2 has a causal effect on Y . The hidden confounder h will cause OLS to be inconsistent. The sample size is n = 200. We simulate N = 500 runs.
We consider four estimators: GCD (using both E 1 and E 2 ), GCDE1 (uses only environment E 1 ), GCDE2 (uses only environment E 2 ), and OLS (ordinary least squares). For the GCD, the two-step estimator is used since the two environments overidentify β. For initial weight for the GCD two-stage we use Note that the CD cannot be applied here because E 2 is a continuous environment. Table 1 provides the empirical coverage probabilities of 95% confidence intervals for each parameter and the median CI width. The rows of the table correspond to different estimators. OLS is inconsistent because of hidden confounding. This results in the coverage probabilities being well below nominal levels (0 in the case of β 2 ). The three GCD methods (GCD, GCDE1, and GCDE2) all have empirical coverage probabilities near or above 95%. However GCDE1 and GCDE2 obtain this coverage by producing extremely wide confidence intervals. For example, the median CI width for GCDE2 for β 2 is 10 times that for GCD. Similarly, the median width of the β 3 CI for GCDE1 is about 10 times the median width for GCD. By only using the information in one of the environment variables, GCDE1 and GCDE2 produce highly uncertain estimators with very wide confidence intervals.

Recall that the Mean + Noise Shift Model defined in Equation 15
is IV is inconsistent when R = 0. It will be a poor estimator when R is near 0 because the instrument is weak. In similar fashion GCD is inconsistent when α v = 0. It will be a poor estimator when α v is near 0. The hybrid GMM specified in Equation (16) is consistent whenever IV or GCD is consistent because it can leverage changes in the mean or variance induced by the instrument/environment E. Here we consider two simulation settings. In both simulations: where all exogenous variables (h, X , Y ,E) are independent. In Model 1, R = 5 and α v = 1 so that E has a strong effect on the mean of X and only a weak effect on the variance. In Model 2, R = 1 and α v = 5 so that E has a weak effect on the mean of X and a strong effect on the variance. We fit IV, GCD, and the Hybrid estimator on these two models. IV and GCD do not require specification of a weight matrix because the number of parameters equals the number of constraints. For the Hybrid estimator, we perform a two step procedure to estimate the optimal weight matrix, using for an initial weighting. Empirical sampling distributions with N = 1000 simulations are shown in Figure 3. The Hybrid estimator performs well for both models while IV and the GCD each only perform well for one of the models.  6 Application to Flow Cytometry Data Sachs et al. [2005] measured the abundance of 11 biochemical agents in thousands of cells using flow cytometry. These data were collected under several conditions (or environments) in which external reageants were added to the system. Each reagent has the effect of stimulating or inhibiting particular agents in the system. Five conditions used in this work (1 observational and 4 interventional) are described in Table 2.
In the observational condition, only a general perturbation (CD3+CD28) is applied. For the observational condition, the expression of the 11 biochemical agents were measured in 853 cells. In Condition 3, the reagent Psitectorignin, an inhibitor of PIP2 was added to the system in addition to the general perturbation. The effect of this perturbation should reduce the abundance of PIP2 (one of the 11 measured agents) as well as alter the abundance of any agents which PIP2 itself effects.  fit the CD to this data to infer a causal signalling network (graph) among the 11 agents. Here we compare the performance of the Causal Dantzig with Instrumental Variable estimator and a Hybrid estimator discussed in this work. Before fitting any models, we hyperbolic arcsine transform the data. This technique is used to approximately normalize the flow cytometry data to better satisfy modelling assumptions and reduce the influence of outliers [Ray and Saumyadipta, 2012].

Univariate Analysis
We first consider the problem of determining whether a particular agent X has a total causal effect on another agent Y . In general, simple regression of Y on X will not consistently estimate the total causal effect of X on Y because hidden confounding and reverse causality will induce an association between X and Y even when X has no causal effect on Y . To address this problem, we consider (X, Y ) data from two environments: an observational environment involving only a general system perturbation and an interventional environment which includes the general perturbation plus a reagent designed to perturb X. Presence of absence of the additional reagent is modeled using an instrument (environment) variable E. We focus on two causes (different X variables), PIP2 and MEK, in order to demonstrate similarities and differences in IV and CD modeling results.

PIP2
Using the Causal Dantzig,   (Figure 3) did not find that PIP2 is a direct cause of changes in any of the other 10 biochemical agents. This implies that PIP2 should not have a total effect on any of the agents in the system. To investigate this, we consider abundance measures from cells in two conditions: observational (the general perturbation only) and Condition 3 (Psitectorignin plus general perturbation). The condition is treated as a binary instrumental variable / environment. This is justified by the fact that Psitectorignin is meant to directly target PIP2 and any effects on other agents should occur by way of PIP2.
Since the CD and GCD are identical in this case, we compare the CD with IV. Figure 4 displays scatter plots of cellular abundances of Plcg versus PIP2 and PIP3 versus PIP2. Red points are for cells measured with the intervention Psitectorignin applied while blue points are cells measured without the intervention. As expected, Psitectorignin has a strong effect on PIP2, substantially decreasing its mean. Plcg and PIP3 abundances are also strongly influenced by the intervention. This suggests that PIP2 is a cause (either directly or possibly indirectly through other agents) of both Plcg and PIP3. Note that the intervention primarily effects the mean, rather than the variance, of PIP2. Thus the CD may struggle  (-5.46, 9.21) (0.40, 0.45) (-8.50, 5.62) (0.20, 0.25)  to identify an effect because it is sensitive to variance, not mean, shifts. In contrast, IV is better suited to settings where the instrument/environment effects the exposure mean. This is a possible explanation for why the CD did not identify PIP2 as a cause of changes of other agents in .  Table 3 contains parameter estimates, confidence intervals, and p-values for fitting the CD and IV to the two plots in Figure 4. As expected, the CD does not find a significant causal effect while IV does.

MEK
We now consider estimating the total causal effect of MEK on RAF, using data from the observational condition and condition 4. Since the condition 4 reagent targets MEK, this serves as a good instrument. Using the Causal Dantzig,  found that MEK has a direct effect on RAF. Figure 5 shows the scatter plot of MEK versus RAF. The mean of MEK in condition 4 is higher than in the observational condition. Further the variance of MEK has increased in condition 4 relative to the observational condition. Thus both CD and IV are likely suitable to estimating a causal effect in this situation. Table  4 shows IV and CD parameter estimates, confidence intervals, and p-values fit using the data in Figure 5. Both methods identify a causal effect.

Multivariate Analysis
For our multivariate analysis, we fit models using the 5 conditions specified in Table 2. We iteratively treat each of the 11 agents as a response and regress it on the other 10 agent abundance measurements. Due to the limited number of conditions relative to reagents (5 instruments and 10 exposures), the IV can not be directly used in this situation. However, we would like the estimator to be sensitive to shifts in mean induced by the interventions. Thus we fit a Hybrid estimator specified in Equation (16). We compare the performance of the Hybrid estimator with the CD and GCD.
Note that, if an agent is used as the target or response variable, then intervention on that agent is not allowed in either CD, GCD or hybrid. So when one of Akt, PIP2, Mek or PKC is used as the response, the total number of environments/instruments will be 4 (observational and 3 conditions), while for all the other cases, the number of environments is 5 (observational and 4 conditions).
When the number of environments is greater than two, the GCD and the CD are not equivalent. Rothenhäusler et al. [2019] proposed two methods for handling the case with greater than 2 environments. We use the hiddenICP version of the CD from the R package InvariantCausalPrediction. With K > 2 environments, hiddenICP iteratively fits the CD with one environment versus all the other environments (K fits). This produces K point estimates and K confidence intervals for each parameter. The parameter estimates across the K fits are averaged to create a single point estimate. The confidence intervals lower limit is the smallest of the lower limits of the individual CD fit confidence intervals. Likewise the confidence interval upper limit is the largest of the upper limits of the individual confidence intervals. Thus the intervals are conservative. Figure 6 compares 95% confidence intervals for the CD, GCD, and Hybrid estimators with a) Plcg and b) PIP3 as the response. CD confidence intervals are very wide relative to GCD and Hybrid. The GCD and the Hybrid estimators perform similarly. In our univariate analysis, we found that PIP2 had a total effect on both Plcg and PIP3. In the multivariate analysis here, GCD and Hybrid identify PIP2 as direct causes of changes in both Plcg and PIP3. The CD fails to identify this effect, due to suboptimal merging of environments and an excessively conservative strategy for constructing confidence intervals. a) b) Figure 6: a) Hybrid, GCD and CD estimation results when Plcg is the response. b) Hybrid, GCD and CD estimation results when PIP3 is the response.
We define a causal effect as strong if the entire 95% confidence interval is outside the range of (−.2, .2). Figure 7 shows the strong causal relations found by the hybrid estimator in a graph. Compared with the results from   (Figure 3), our hybrid estimator finds more strong causal relations: 24 strong relations for hybrid versus 13 for CD. Some relations are found by both methods, e.g. the causal effects and the reverse causal effects between Raf-Mek, P38-Jnk, and Erk-Akt. However, the CD fails to discover the causal effects from PIP2 to Plcg and PIP2 to PIP3, which are illustrated to exist from Figure 4 and discovered by our hybrid estimator. In addition, the hybrid estimator also found similar causal relations with other methods (ICP from  and the Bayesian network from Sachs et al. [2005]). For example, ICP and the hybrid both discovered the causal relations from PIP2 to Plcg and PKA to Erk, while the Bayesian network and the hybrid both discovered the relations from Plcg to PKC and PIP2 to PKC.
Figure 7: Causal network found by the hybrid estimator. The red circles represent the agents that had been intervened.

Discussion
In this work, we demonstrated substantial overlap between the concepts of data collection environment and instrumental variable. This led to practical results including a generalization of the Causal Dantzig and hybrid environment-instrument estimators. In an application to Flow Cytometry data, the GCD and hybrid estimators had better performance than the CD for identifying causal effects which produce a mean shift.
These results were facilitated by treating the data collection environment as a variable and representing the Causal Dantzig as a generalized method of moments estimator. It is conceivable that similar analysis of other environment estimators, such as Invariant Causal Prediction, will lead to further connections between environments and instruments. Rothenhäusler et al. [2019] proposed using the Dantzig selector [Candes et al., 2007] to regularize the Causal Dantzig in high dimensional problems. Many methods exist for fitting high dimensional instrumental variable estimators [Belloni et al., 2012, Gold et al., 2020, Lin et al., 2015. This work focused on conceptual connections between instruments and environments and thus did not address the topic of high dimensional inference for the GCD or the hybrid estimators. Since these are GMM estimators, existing methods for fitting high dimensional GMM estimators (penalty terms, tuning parameter selection algorithms, and theory) may be applicable [Belloni et al., 2018] and represent a direction for future research.
Now suppose Equation (9)  We now show that if Equation (9) does not hold, then Equation (25) is not satisfied. When Equation (9) This is a contradiction so Equation (25) cannot be satisfied and thus m GCD (β) = 0.

Proof of Theorem 2
1. Note that where C does not depend on β. This is a quadratic function in β. The matrix M is positive definite under the assumptions that W 0 and X T (E • X) has column rank p. Thus the unique minimizer is given by Note that if α v = 0, then B > 0. To see this, first note Note that E ≥ −α 0 /α v , which implies (α 2 v E + 2α 0 α v ) > 0. Thus the last quantity is always greater than 0. Thus for Noise models where R = 0, β 0 is the unique root of m GCD . For Mean Shift models where α v = 0, B = 0 so A must be non-zero. This will not be the case when E is symmetric about 0 because then E[E 3 ] = 0. For Mean + Noise Shift models (R = 0 and α v = 0), β 0 will be the unique root of m GCD whenever A + B = 0. This would be the case if, for instance, E is symmetric about 0 because in this case A = 0 and B > 0.
• Hard (do) Interventions We have

Proof of Theorem 3
Sufficient to show that W GCD → PW .
Let γ i be the i th row of E • X. Then The quantity B 1 → PW by the LLN. Sufficient to show B 2 , B 3 → P 0. Note that