From 3c96208babcc54a7dd294b332ba575f5192704b6 Mon Sep 17 00:00:00 2001 From: Ilias Tsoumas Date: Fri, 15 Jul 2022 11:39:51 +0300 Subject: [PATCH] Update dowhy_mediation_analysis.ipynb (#498) * 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 --- .../example_notebooks/dowhy_mediation_analysis.ipynb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb b/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb index 336ce3fc96..53cdc4a750 100644 --- a/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb +++ b/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb @@ -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", @@ -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)" ] }, { @@ -153,7 +153,7 @@ "metadata": {}, "outputs": [], "source": [ - "print(causal_estimate_nde.value, data[\"ate\"])" + "print(causal_estimate_nie.value, data[\"ate\"])" ] }, { @@ -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", @@ -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)" ] }, {