Extension of Kaplan-Meier methods in observational studies with time-varying treatment.