Skip to content

Issue with parallel mediators/multiple directed paths #1334

@dafxy

Description

@dafxy

It is ignoring mediator M2:

import dowhy

vertices = ['D', 'M1', 'M2', 'Y']
dag = """
D -> {M1, M2, Y}
M1 -> Y
M2 -> Y
"""

G = dowhy.CausalModel(data=pd.DataFrame(columns=vertices),
                        graph=f"digraph{{{dag}}}",
                        treatment = "D",
                        outcome="Y",
                        )
print(G.identify_effect(estimand_type='nonparametric-nie'))

Estimand type: EstimandType.NONPARAMETRIC_NIE

### Estimand : 1
Estimand name: mediation
Estimand expression:
 ⎡  d       d        ⎤
E⎢─────(Y)⋅────([M₁])⎥
 ⎣d[M₁]    d[D]      ⎦
Estimand assumption 1, Mediation: M1 intercepts (blocks) all directed paths from D to Y except the path {D}→{Y}.
Estimand assumption 2, First-stage-unconfoundedness: If U→{D} and U→{M1} then P(M1|D,U) = P(M1|D)
Estimand assumption 3, Second-stage-unconfoundedness: If U→{M1} and U→Y then P(Y|M1, D, U) = P(Y|M1, D)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions