Stata DO file for trial analysis