Skip to content

Commit

Permalink
updates second revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssam Zenati committed Dec 13, 2023
1 parent b474dfa commit faad501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/med_bench/get_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/med_bench/mediation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faad501

Please sign in to comment.