Author: Bailey DeBarmore
Do you want to model trajectories by calculating transition probabilities? You can do this in Stata with just a little extension of your longitudinal data analysis skills.
We'll be using xttrans (built in to Stata) or xttrans2 (a module you can download).
Your data will need to be in LONG format. To reshape from wide to long, use:
reshape long stub, i(id) j(time)
Where stub is the stubname of your variable, i is the variable that uniquely identifies observations in your data set, and j is the time variable.
Practical solutions for conducting great epidemiology methods. Transparency in code. Attitude of constant improvement.
Appreciate my stuff?