Assortatively mixed two-risk-group SIS model (source code)

= Assortatively mixed two-risk-group SIS model
{title2=$\dot x=(1-x)(Ax+By)-\gamma x,\quad\dot y=(1-y)[Cx+(D-C)y]-\gamma y$}

For high-risk group fraction $p$, fixed total contact rates and reciprocal cross-group contacts, let $C=Bp/(1-p)$. The displayed <SIS model> describes within-group infectious fractions. In fractions the transmission <matrix> is $M=\begin{pmatrix}A&B\\C&D-C\end{pmatrix}$; in infected-person counts it is $\operatorname{diag}(p,1-p)M\operatorname{diag}(p,1-p)^{-1}$. A common <recovery rate> gives <basic reproduction number> $\rho(M)/\gamma$. The <mean> population susceptible fraction does not generally equal its reciprocal.