From faad501d217974552e24d75ddc914f3d5e6b7da8 Mon Sep 17 00:00:00 2001 From: Houssam Zenati Date: Wed, 13 Dec 2023 16:52:53 +0100 Subject: [PATCH] updates second revisions --- src/med_bench/get_estimation.py | 4 ++-- src/med_bench/mediation.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/med_bench/get_estimation.py b/src/med_bench/get_estimation.py index 6e8fdd3..7c3ace0 100644 --- a/src/med_bench/get_estimation.py +++ b/src/med_bench/get_estimation.py @@ -9,7 +9,7 @@ import numpy as np from .mediation import ( mediation_IPW, - mediation_coefficient_products, + mediation_coefficient_product, mediation_g_formula, mediation_multiply_robust, mediation_DML, @@ -64,7 +64,7 @@ def get_estimation(x, t, m, y, estimator, config): raw_res_R = np.array(output_w.rx2("results")) effects = raw_res_R[0, :] elif estimator == "coefficient_product": - effects = mediation_coefficient_products(y, t, m, x) + effects = mediation_coefficient_product(y, t, m, x) elif estimator == "mediation_ipw_noreg": effects = mediation_IPW( y, diff --git a/src/med_bench/mediation.py b/src/med_bench/mediation.py index 930d427..e65baf0 100644 --- a/src/med_bench/mediation.py +++ b/src/med_bench/mediation.py @@ -260,7 +260,7 @@ def mediation_IPW(y, t, m, x, w, z, trim, logit, regularization=True, forest=Fal len(y) - np.sum(ind)) -def mediation_coefficient_products(y, t, m, x, interaction=False, regularization=True): +def mediation_coefficient_product(y, t, m, x, interaction=False, regularization=True): """ found an R implementation https://cran.r-project.org/package=regmedint