Open jfunction opened 7 months ago
I wanted to note that after doing some tests using deSolve::ode
it seems the generative model used to construct SIRSample
outputs uses the following rates function:
function(t, state, parameters) {
# Rates with foi as expected and immunity as stated (foi uses I, immunity is R->S)
with(as.list(c(state, parameters)), {
lambda <- aSI * I/(S+I+R)
dS = aSR*R - lambda*S
dI = lambda*S - aIR*I
dR = aIR*I - aSR*R
return(list(c(dS, dI, dR)))
})
So it looks like documentation should read \item{aSR}{Waning immunity: transition rate from R to S}
and S' = aSR*R - aSI*S*I/(S+I+R)
. That said I would usually expect to see lambda
introduced as above.
Hi, Yes, you're absolutely right about the errors in the documentation for SIRSample (and by extension, SIRImplausibility); that documentation has been fixed in commit 968468dfe2e4578c2858dbae9a5b9e0735c2fb75 - I'll leave this issue open, however, to remind myself to provide data-generation code within the package.
Hi - thanks for this package it's very interesting.
I noticed the SIRSample dataset describes the underlying equations of an SIR model. eg, https://github.com/andy-iskauskas/hmer/blob/7a7f459ad63e2ca9baf6cabf2bc87d05f8c6d452/man/SIRSample.Rd#L31
In this model, the force of infection is effectively
aSI*R/(S+I+R)
. Surely this should haveI
instead ofR
in the numerator here? As written, it is effectively saying that the infectious reservoir is those who have recovered.Additionally, the definition of
aSR
is "Immunisation: transition rate from S to R". In the equationsaSR*R
is added toS'
and subtracted fromR'
meaning that it models populations moving fromR
toS
rather than moving fromS
toR
- is this intended?I may have missed it, but it would be most useful if a data generation script was included as described in https://r-pkgs.org/data.html#sec-data-data-raw - that would help to understand exactly how the data were generated.