Displaying 1 result from an estimated 1 matches for "vaxeff".
2007 Jun 06
3
Using odesolve to produce non-negative solutions
...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 derivatives
for (i in 1:length(y)) {
if (y[i]<0) {
y[i] <- 0
}
}
S <...