Every application may not be done directly in Stata but some applications may be done by the user by programming. Ad hoc pairwise comparison may be one such application.
To use a post-hoc method like Duncan's multiple or Turkey's method conduct ANOVA on n means. Obtain the error mean square EMS. Order the means. Take the largest minus the smallest = d(n). Compare d(n) with sqr(EMS/r)*f(n) where r is the error degree of freedom and f(n) is the critical value in the statistical table. If d(n) > sqr(EMS/r) then the two means are significantly different. Otherwise, they are not. The argument remains the same for other ranges.