  Gun violence is a major source of injury and death in the United States.
However, relatively little is known about the effects of firearm injuries on
survivors and their family members and how these effects vary across
subpopulations. To study these questions and, more generally, to address a gap
in the causal inference literature, we present a framework for the study of
effect modification or heterogeneous treatment effects in
difference-in-differences designs. We implement a new matching technique, which
combines profile matching and risk set matching, to (i) preserve the time
alignment of covariates, exposure, and outcomes, avoiding pitfalls of other
common approaches for difference-in-differences, and (ii) explicitly control
biases due to imbalances in observed covariates in subgroups discovered from
the data. Our case study shows significant and persistent effects of nonfatal
firearm injuries on several health outcomes for those injured and on the mental
health of their family members. Sensitivity analyses reveal that these results
are moderately robust to unmeasured confounding bias. Finally, while the
effects for those injured vary largely by the severity of the injury and its
documented intent, for families, effects are strongest for those whose
relative's injury is documented as resulting from an assault, self-harm, or law
enforcement intervention.
