Displaying 1 result from an estimated 1 matches for "mybirth".
2007 Jun 06
3
Using odesolve to produce non-negative solutions
...E solution non-negative at all times. What is the right way to do this in R?
Thanks,
Jeremy
P.S., Below is a simplified version of the code I use to try to do this, but I am not sure that it is theoretically right
dynmodel <- function(t,y,p)
{
## Initialize parameter values
birth <- p$mybirth(t)
death <- p$mydeath(t)
recover <- p$myrecover
beta <- p$mybeta
vaxeff <- p$myvaxeff
vaccinated <- p$myvax(t)
vax <- vaxeff*vaccinated/100
## If the state currently has negative quantities (shouldn't have), then reset to reasonable values for computing meaningful deri...