Various statistical methods can be used to analyze correlated data from a clinical study. At baseline of the EXPLORE study, a multi-site HIV prevention clinical trial conducted in the U.S., data from the most recent sexual episode with up to three of the most recent partners were collected. We were interested in the relationship between substance use and risky sexual behavior. To address the within-individual effects, we first used non-linear mixed models (Proc NLMIX) and found computational difficulties. Then, we used conditional logistic regression (Proc PHREG) for the within-individual effects, and generalized estimating equations (Proc GENMOD) for the between-individual effects. In this paper, we show examples of these techniques using SAS and compare the methods.