Skip to content

Commit

Permalink
Update dowhy_mediation_analysis.ipynb (#498)
Browse files Browse the repository at this point in the history
* Update dowhy_mediation_analysis.ipynb

You had assign in causal_estimate_nie variable the natural direct effect and vice versa, so I corrected the typo.

* Update dowhy_mediation_analysis.ipynb
  • Loading branch information
itsoum authored Jul 15, 2022
1 parent a157aa8 commit 3c96208
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/example_notebooks/dowhy_mediation_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"outputs": [],
"source": [
"import dowhy.causal_estimators.linear_regression_estimator\n",
"causal_estimate_nde = model.estimate_effect(identified_estimand_nie,\n",
"causal_estimate_nie = model.estimate_effect(identified_estimand_nie,\n",
" method_name=\"mediation.two_stage_regression\",\n",
" confidence_intervals=False,\n",
" test_significance=False,\n",
Expand All @@ -137,7 +137,7 @@
" 'second_stage_model': dowhy.causal_estimators.linear_regression_estimator.LinearRegressionEstimator\n",
" }\n",
" )\n",
"print(causal_estimate_nde)"
"print(causal_estimate_nie)"
]
},
{
Expand All @@ -153,7 +153,7 @@
"metadata": {},
"outputs": [],
"source": [
"print(causal_estimate_nde.value, data[\"ate\"])"
"print(causal_estimate_nie.value, data[\"ate\"])"
]
},
{
Expand All @@ -172,7 +172,7 @@
"metadata": {},
"outputs": [],
"source": [
"causal_estimate_nie = model.estimate_effect(identified_estimand_nde,\n",
"causal_estimate_nde = model.estimate_effect(identified_estimand_nde,\n",
" method_name=\"mediation.two_stage_regression\",\n",
" confidence_intervals=False,\n",
" test_significance=False,\n",
Expand All @@ -181,7 +181,7 @@
" 'second_stage_model': dowhy.causal_estimators.linear_regression_estimator.LinearRegressionEstimator\n",
" }\n",
" )\n",
"print(causal_estimate_nie)"
"print(causal_estimate_nde)"
]
},
{
Expand Down

0 comments on commit 3c96208

Please sign in to comment.