search for: shat_old

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

Did you mean: ihat_old
2007 Jun 06
3
Using odesolve to produce non-negative solutions
...eath*S) - (beta*S*I/N) ihat <- (beta*S*I/N) - (death*I) - (recover*I) rhat <- (birth*(vax)) + (recover*I) - (death*R) ## Do we overshoot into negative space, if so shrink derivative to bring state to 0 ## then rescale the components that take the derivative negative if (shat+S<0) { shat_old <- shat shat <- -1*S scaled_transmission <- (shat/shat_old)*(beta*S*I/N) ihat <- scaled_transmission - (death*I) - (recover*I) } if (ihat+I<0) { ihat_old <- ihat ihat <- -1*I scaled_recovery <- (ihat/ihat_old)*(recover*I) rhat <- scaled_recovery +(birt...