Skip to content

Commit

Permalink
check the if conditions again
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Jan 23, 2025
1 parent 81885de commit 8a06bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/stan/functions/infections.stan
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ vector generate_infections(vector oR, int uot, vector gt_rev_pmf,
// iteratively update infections
for (s in 1:ot) {
infectiousness[s] = update_infectiousness(infections, gt_rev_pmf, uot, s);
if (use_pop == 1 || (use_pop == 2 && s > nht)) {
if (use_pop == 2 || (use_pop == 1 && s > nht)) {
exp_adj_Rt = exp(-R[s] * infectiousness[s] / (pop - cum_infections[s]));
exp_adj_Rt = exp_adj_Rt > 1 ? 1 : exp_adj_Rt;
infections[s + uot] = (pop - cum_infections[s]) * (1 - exp_adj_Rt);
Expand Down

0 comments on commit 8a06bdc

Please sign in to comment.