In the attached R script, I have set the immunity for my vaccination node to be Inf. But there are many cases where people get vaccinated more than once.
I have found a workaround for this issue, but I wanted to bring your attention to the issue in the code anyway.
For reference, here is the specification of the model. (It's also in the code of course but thought it might help to show it here.)
That image doesn't show the prob functions for the other nodes, but those are in the code, and I don't see why those should be contributing to people getting vaccinated more than once.
Again, it's easy enough to fix this -- an fifelse to prevent people from getting vaccinated based on the time_since_last works fine -- but wanted you to know that immunity may not be functioning as intended.
Hi Robin, simDAG - waning vax - Git - immunity bug.txt
In the attached R script, I have set the immunity for my vaccination node to be Inf. But there are many cases where people get vaccinated more than once.
I have found a workaround for this issue, but I wanted to bring your attention to the issue in the code anyway.
For reference, here is the specification of the model. (It's also in the code of course but thought it might help to show it here.)
That image doesn't show the prob functions for the other nodes, but those are in the code, and I don't see why those should be contributing to people getting vaccinated more than once.
Again, it's easy enough to fix this -- an
fifelse
to prevent people from getting vaccinated based on the time_since_last works fine -- but wanted you to know that immunity may not be functioning as intended.