The product limit method of Kaplan and Meier for estimating survival functions and the logrank test of Mantel are widely employed for analysis of longitudinal medical data. Developed for analysis of one-time events such as death, survival analysis is also commonly adapted to more complex states such as loss of vision or cancer remission by restricting analysis to first occurrences. The nonparametric discrete time nonhomogeneous Markov process is proposed as a better model for any applications of the latter type. This simple stochastic model allows for an arbitrary number of possible states and for transitions in any direction. Maximum likelihood estimators are easily computed for the stochastic model and are identical to the product-limit estimates in the special case represented by the Kaplan-Meier model. The logrank test extends to evaluation of differences between populations with respect to any specified transition.