Skip to content

Commit 0c806b8

Browse files
committed
remove beta_ps interaction
Signed-off-by: Nathaniel <[email protected]>
1 parent b48b82c commit 0c806b8

File tree

2 files changed

+734
-840
lines changed

2 files changed

+734
-840
lines changed

causalpy/pymc_models.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ class initialisation.
613613
dims="outcome_coeffs",
614614
)
615615

616-
beta_ps = pm.Normal("beta_ps", 0, 1, size=2)
616+
beta_ps = pm.Normal("beta_ps", 0, 1)
617617

618618
chosen = np.random.choice(range(propensity_scores.shape[1]))
619619
p = propensity_scores[:, chosen].values
@@ -622,12 +622,7 @@ class initialisation.
622622
"a_outcome", priors["a_outcome"][0], priors["a_outcome"][1]
623623
)
624624

625-
mu_outcome = (
626-
alpha_outcome
627-
+ pm.math.dot(X_data_outcome, beta)
628-
+ beta_ps[0] * p
629-
+ beta_ps[1] * (p * self.t.flatten())
630-
)
625+
mu_outcome = alpha_outcome + pm.math.dot(X_data_outcome, beta) + beta_ps * p
631626

632627
if spline_component:
633628
beta_ps_spline = pm.Normal("beta_ps_spline", 0, 1, size=34)

0 commit comments

Comments
 (0)