Latent class analysis (LCA) is a statistical approach to identifying underlying subgroups (i.e. latent classes) of individuals based on their responses to a set of observed categorical variables. Latent transition analysis (LTA) extends this framework to longitudinal data in order to estimate the incidence of transitions over time in latent class membership. This study provides an introduction to LCA and LTA, including the use of grouping variables and covariates, and demonstrates the use of two SAS ® procedures (PROC LCA and PROC LTA) to fit these models. The empirical demonstration involved data from 457 women who participated in the Women's Interagency HIV Study (WIHS). First, LCA was used to identify drug use latent classes based on reported use of tobacco, alcohol, marijuana, crack/cocaine/heroin and other drugs. Second, LTA was used to estimate the incidence of transitions in drug use latent classes over a one-year period. Third, racial differences in initial drug use and transitions over time were examined using multiple-groups LTA. Fourth, the effect of participation in an alcohol or drug treatment program on initial latent class membership and transitions over time were examined using LTA with covariates. Measurement invariance across time and groups is examined.