We estimate the effect of financial incentives for reenlistment on military retention rates using a stochastic dynamic programming model. We show that the computational burden of the model is relatively low even when estimated on panel data with unobserved heterogeneity. The estimates of the model show strong effects of military compensation, especially of retirement pay, on retention rates. We also compare our model with simpler-to-compute models and find that all give approximately the same fit but that our dynamic programming model gives more plausible predictions of policy measures that affect military and civilian compensation at future dates.