We consider using observational data to estimate the effect of a treatment on disease recurrence, when the decision to initiate treatment is based on longitudinal factors associated with the risk of recurrence. The effect of salvage androgen deprivation therapy (SADT) on the risk of recurrence of prostate cancer is inadequately described by the existing literature. Furthermore, standard Cox regression yields biased estimates of the effect of SADT, since it is necessary to adjust for prostate-specific antigen (PSA), which is a time-dependent confounder and an intermediate variable. In this paper, we describe and compare two methods which appropriately adjust for PSA in estimating the effect of SADT. The first method is a two-stage method which jointly estimates the effect of SADT and the hazard of recurrence in the absence of treatment by SADT. In the first stage, PSA is predicted in the absence of SADT, and in the second stage, a time-dependent Cox model is used to estimate the benefit of SADT, adjusting for PSA. The second method, called sequential stratification, reorganizes the data to resemble a sequence of experiments in which treatment is conditionally randomized given the time-dependent covariates. Strata are formed, each consisting of a patient undergoing SADT and a set of appropriately matched controls, and analysis proceeds via stratified Cox regression. Both methods are applied to data from patients initially treated with radiation therapy for prostate cancer and give similar SADT effect estimates.