From eed167b28bb6dc395d2785ce4d668f6b0f454cc4 Mon Sep 17 00:00:00 2001 From: Ilias Tsoumas Date: Thu, 30 Jun 2022 17:32:26 +0300 Subject: [PATCH 1/2] 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. --- .../example_notebooks/dowhy_mediation_analysis.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb b/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb index 336ce3fc96..ef76585a1a 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)" ] }, { @@ -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)" ] }, { From 32d447c88440fd64ea0549dac922783d9706bae9 Mon Sep 17 00:00:00 2001 From: Ilias Tsoumas Date: Thu, 7 Jul 2022 14:43:53 +0300 Subject: [PATCH 2/2] Update dowhy_mediation_analysis.ipynb --- docs/source/example_notebooks/dowhy_mediation_analysis.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb b/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb index ef76585a1a..53cdc4a750 100644 --- a/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb +++ b/docs/source/example_notebooks/dowhy_mediation_analysis.ipynb @@ -153,7 +153,7 @@ "metadata": {}, "outputs": [], "source": [ - "print(causal_estimate_nde.value, data[\"ate\"])" + "print(causal_estimate_nie.value, data[\"ate\"])" ] }, {