SIR model with waning immunity (source code)

= SIR model with waning immunity
{c}

= SIRS model
{c}
{synonym}

For susceptible, infective, and recovered populations $S,I,R$, mass-action infection coefficient $\beta$, recovery rate $\nu$, and immunity-loss rate $f$, the SIRS equations are
$$
S'=fR-\beta IS,
\qquad I'=\beta IS-\nu I,
\qquad R'=\nu I-fR.
$$
They conserve $S+I+R=N$ and have basic reproduction number $\mathcal R_0=\beta N/\nu$.