Since the 1970s, Rubin has promoted a model for causal inference based on the potential outcomes if individuals received each of the treatments under study. Commonly, the assumption is made that the outcome in one individual is independent of the treatment assignment and outcome in other individuals. In infectious diseases, however, whether one person becomes infected is quite often dependent on the infection outcome in other individuals, a situation known as dependent happenings. Here, we review the model proposed by Rubin for the example of infectious disease. Consequences of the violation of the stability assumption include the need for an expanded representation of outcomes, and the existence of different kinds of effects, such as direct and indirect effects. Effects of interest include changes in susceptibility as well as changes in infectiousness. We define the transmission probability formally as an average causal parameter of effect in a population by conditioning on exposure to infection. Unconditional indirect and total effects are difficult to define formally using this model for causal inference. The assignment mechanism can influence the sampling mechanism when it determines who is exposed to infection, raising problems that require further inquiry. We conclude by contrasting the role of differential exposure to infection in direct and indirect effects.