search for: dynmodel

Displaying 1 result from an estimated 1 matches for "dynmodel".

Did you mean: dmodel
2007 Jun 06
3
Using odesolve to produce non-negative solutions
...egative option which tells the Matlab solver to keep the vector elements of the ODE 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 (s...