You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From Pierre,
rate <- lambda[t, , 1] +
apply(epsilon * lambda[t, , -1, drop = FALSE], c(1, 2), sum) + # something fishy here with the sum given epsilon can be >1Dim
1 / priors$R$scale
[11:32] Nouvellet, Pierre
I think this bit is problematic: apply(epsilon * lambda[t, , -1, drop = FALSE], c(1, 2), sum) as, say for 2 variants, we want to multiply each epsilon to lambda[t,,2] and then lambda[t,,3]
Pierre suggests that a quick fix would be to replace the line mentioned above by:
temp <- lambda[t, , 1]
for(i in 2:dim(incid)[3]){
temp <- temp + epsilon[i-1]*lambda[t, , i]
}
rate <- temp + 1 / priors$R$scale
The text was updated successfully, but these errors were encountered:
I have implemented Pierre's suggestion and all tests pass OK. But I am not sure I fully understand. I think the previous implementation was achieving the right updates (epsilon_v * lambda^t_v for each t).
Branch fix_122, commit 72d26f6
From Pierre,
rate <- lambda[t, , 1] +
apply(epsilon * lambda[t, , -1, drop = FALSE], c(1, 2), sum) + # something fishy here with the sum given epsilon can be >1Dim
1 / priors$R$scale
[11:32] Nouvellet, Pierre
I think this bit is problematic: apply(epsilon * lambda[t, , -1, drop = FALSE], c(1, 2), sum) as, say for 2 variants, we want to multiply each epsilon to lambda[t,,2] and then lambda[t,,3]
Pierre suggests that a quick fix would be to replace the line mentioned above by:
temp <- lambda[t, , 1]
for(i in 2:dim(incid)[3]){
temp <- temp + epsilon[i-1]*lambda[t, , i]
}
rate <- temp + 1 / priors$R$scale
The text was updated successfully, but these errors were encountered: