Toward a theory of drug epidemics