Skip to content

Commit

Permalink
Fixed sc.chol_sample bug in ModelF discrepancy
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeesleyBIOSTAT committed May 23, 2024
1 parent f193099 commit 1194764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impala/superCal/models_withLik.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23.
+ self.D.T @ (cov['inv'].flatten() * np.eye(len(yobs))) @ self.D
)
m = self.D.T @ (cov['inv'] * np.eye(len(yobs))) @ (yobs - pred)
discrep_vars = sc.chol_sample(S @ m, S/itemp)
discrep_vars = chol_sample(S @ m, S/itemp)
return discrep_vars


Expand Down Expand Up @@ -540,7 +540,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23.
+ self.D.T @ self.vmat
)
self.m = self.D.T @ self.vec
discrep_vars = sc.chol_sample((S @ self.m).flatten(), S/itemp)
discrep_vars = chol_sample((S @ self.m).flatten(), S/itemp)
return discrep_vars
def llik(self, yobs, pred, cov): # assumes diagonal cov
self.vec = yobs.flatten() - pred.flatten()
Expand Down

0 comments on commit 1194764

Please sign in to comment.