  In this paper, we generalize methods in the Difference in Differences (DiD)
literature by showing that both additive and multiplicative standard and coarse
Structural Nested Mean Models (Robins, 1994, 1997, 1998, 2000, 2004; Lok and
Degruttola, 2012; Vansteelandt and Joffe, 2014) are identified under parallel
trends assumptions. Our methodology enables adjustment for time-varying
covariates, identification of effect heterogeneity as a function of
time-varying covariates, identification of additional causal contrasts (such as
effects of a `blip' of treatment at a single time point followed by no further
treatment and controlled direct effects), and estimation of treatment effects
under a general class of treatment patterns (e.g. we do not restrict to the
`staggered adoption' setting, and treatments can be multidimensional with any
mix of categorical and continuous components). We stress that these extensions
come essentially for free, as our parallel trends assumption is not stronger
than other parallel trends assumptions in the DiD literature. We also provide a
method for sensitivity analysis to violations of our parallel trends
assumption. However, in contrast to much of the DiD literature, we only
consider panel data, not repeated cross sectional data. We also explain how to
estimate optimal treatment regimes via optimal regime Structural Nested Mean
Models under parallel trends assumptions plus an additional extremely strong
assumption that there is no effect modification by unobserved confounders.
Finally, we illustrate our methods with real data applications estimating
effects of bank deregulation on housing prices and effects of floods on flood
insurance take-up.
