I don't know STATA at all, but you want some kind of multilevel model. If your outcome variable is continuous, then the linear multilevel model is the place to start. (These models go by a variety of names - mixed models being most prominent). Essentially the regular linear model is (in matrix notation)

where the e are assumed to be independent. This assumption is violated with repeated measures and MLM use instead

to deal with this. (This divides things into fixed and random effects)