Skip to content
Prev 191 / 696 Next

[R-sig-dyn-mod] metapopulation SIR model

Dear Vincent,

I appreciate that you are fighting with the topic, but not all modelling
questions can be solved by volunteer support. As far as I see, your
fluxrate approach seems to go into a promising direction, but don't
have time to check if "it is all right".
On 23.04.2013 16:46, vincent laperriere wrote:
This is not possible because the deSolve help file ?ode tells us:

"If func is an R-function, it must be defined as:
func <- function(t, y, parms,...)."
No, it would not follow the syntax of R/deSolve's "ode" function. States
have to be bound together as a vector. But, you have the option to
reorganize your states internally in the model function, as long as
states at the beginning and derivatives at the end remain a vector and
occur in the same order.
See above, sorry. Nevertheless, I've put some code together yesterday
evening, just for recreation ;-) Maybe this gives you some idea:

http://hhbio.wasser.tu-dresden.de/projects/modlim/src/SIR-metapop.R


I'm sure this can be made even simpler, more realistic or whatever.

Maybe that someone else on this list can give you more insight ?!!!
Comments are welcome.

thpe