Problem
In the solutions code we have Ab waning as
|
antib[i] <- antib[i] - wane * dt |
And antib starts at 0.
|
antib <- rep(0, n) # Antibody concentration for each individual |
- I don't think this is biologically plausible, but lmk if that was meant to be log Abs...
- As such, vaccination can have no/minimal effect if Ab levels are well below 1.
Suggested fix
Enforce Ab levels to be positive by adding max(0, new Ab level)
antib[i] <- max(0, antib[i] - wane * dt)
Problem
In the solutions code we have Ab waning as
mtm/08_StochasticIBM_solutions.qmd
Line 184 in 4cdceca
And
antibstarts at 0.mtm/08_StochasticIBM_solutions.qmd
Line 162 in 4cdceca
Suggested fix
Enforce Ab levels to be positive by adding max(0, new Ab level)
antib[i] <- max(0, antib[i] - wane * dt)