  Technological advancements in the field of mobile devices and wearable
sensors have helped overcome obstacles in the delivery of care, making it
possible to deliver behavioral treatments anytime and anywhere. Increasingly
the delivery of these treatments is triggered by predictions of risk or
engagement which may have been impacted by prior treatments. Furthermore the
treatments are often designed to have an impact on individuals over a span of
time during which subsequent treatments may be provided.
  Here we discuss our work on the design of a mobile health smoking cessation
experimental study in which two challenges arose. First the randomizations to
treatment should occur at times of stress and second the outcome of interest
accrues over a period that may include subsequent treatment. To address these
challenges we develop the "stratified micro-randomized trial," in which each
individual is randomized among treatments at times determined by predictions
constructed from outcomes to prior treatment and with randomization
probabilities depending on these outcomes. We define both conditional and
marginal proximal treatment effects. Depending on the scientific goal these
effects may be defined over a period of time during which subsequent treatments
may be provided. We develop a primary analysis method and associated sample
size formulae for testing these effects.
