The SIR Epidemic Model
The derivative function of the SIR Epidemic Model, an example of a two dimensional autonomous ODE system.
Value of t, the independent variable, to evaluate the derivative at. Should be a single number.
Values of x and y, the dependent variables, to evaluate the derivative at. Should be a vector of length 2.
Values of the parameters of the system. Should be a vector with parameters specified in the following order: beta, nu.
Evaluates the derivative of the following coupled ODE system at the point (t, x, y):
dx/dt = -beta*x*y, dy/dt = beta*x*y - nu*y.
Format is designed to be compatible with ode from the deSolve package.
Returns a list dy containing the values of the two derivatives at (t, x, y).
Michael J. Grayling
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.