  The aim of personalized medicine is to tailor treatment decisions to
individuals' characteristics. N-of-1 trials are within-person crossover trials
that hold the promise of targeting individual-specific effects. While the idea
behind N-of-1 trials might seem simple, analyzing and interpreting N-of-1
trials is not straightforward. Here we ground N-of-1 trials in a formal causal
inference framework and formalize intuitive claims from the N-of-1 trials
literature. We focus on causal inference from a single N-of-1 trial and define
a conditional average treatment effect (CATE) that represents a target in this
setting, which we call the U-CATE. We discuss assumptions sufficient for
identification and estimation of the U-CATE under different causal models where
the treatment schedule is assigned at baseline. A simple mean difference is an
unbiased, asymptotically normal estimator of the U-CATE in simple settings. We
also consider settings where carryover effects, trends over time, time-varying
common causes of the outcome, and outcome-outcome effects are present. In these
more complex settings, we show that a time-varying g-formula identifies the
U-CATE under explicit assumptions. Finally, we analyze data from N-of-1 trials
about acne symptoms and show how different assumptions about the data
generating process can lead to different analytical strategies.
