Respondent-driven sampling is a network sampling technique typically employed for hard-to-reach populations (for example, drug users, men who have sex with men, people with HIV). Similarly to snowball sampling, initial seed respondents recruit additional respondents from their network of friends. The recruiting process repeats iteratively, thereby forming long referral chains. Unlike in snowball sampling, it is crucial to obtain estimates of respondents’ personal network sizes (that is, number of acquaintances in the target population) and information about who recruited whom. Markov chain theory makes it possible to derive population estimates and sampling weights. We introduce a new Stata command for respondent-driven sampling and illustrate its use.