  We provide an optimization-based framework to perform counterfactual analysis
in a dynamic model with hidden states. Our framework is grounded in the
``abduction, action, and prediction'' approach to answer counterfactual queries
and handles two key challenges where (1) the states are hidden and (2) the
model is dynamic. Recognizing the lack of knowledge on the underlying causal
mechanism and the possibility of infinitely many such mechanisms, we optimize
over this space and compute upper and lower bounds on the counterfactual
quantity of interest. Our work brings together ideas from causality,
state-space models, simulation, and optimization, and we apply it on a breast
cancer case study. To the best of our knowledge, we are the first to compute
lower and upper bounds on a counterfactual query in a dynamic latent-state
model.
