replication_code.pdf from Risk ratios for contagious outcomes

Epidemiologists commonly use the risk ratio to summarize the relationship between a binary covariate and outcome, even when outcomes may be dependent. Investigations of transmissible diseases in clusters—households, villages or small groups—often report risk ratios. Epidemiologists have warned that risk ratios may be misleading when outcomes are contagious, but the nature of this error is poorly understood. In this study, we assess the meaning of the risk ratio when outcomes are contagious. We provide a mathematical definition of infectious disease transmission within clusters, based on the canonical stochastic susceptible-infective model. From this characterization, we define the individual-level ratio of instantaneous infection risks as the inferential target, and evaluate the properties of the risk ratio as an approximation of this quantity. We exhibit analytically and by simulation the circumstances under which the risk ratio implies an effect whose direction is opposite that of the true effect of the covariate. In particular, the risk ratio can be greater than one even when the covariate reduces both individual-level susceptibility to infection, and transmissibility once infected. We explain these findings in the epidemiologic language of confounding and Simpson's paradox, underscoring the pitfalls of failing to account for transmission when outcomes are contagious.