Using Stata to perform power calculations

I want to use simulation in Stata to help me determine whether or not I will have sufficient statistical power to detect meaningful effects (should they exist) in a given data set using generalized DiD approach.

Here is a walk through from Stata of how to do this in a different setting.

I am not very familiar with Stata and so I am having trouble making this work for my setting. Maybe someone here can help me understand how to modify this code for my purposes?

A quick explanation:

I want to test whether or not a policy change at an institution has an impact on outcomes for people in that institution. Let us assume there are N similar institutions in our universe. Some portion of those N institutions, say $\alpha N$, $\alpha \in (0,1)$ implement this policy change of interest. Assume these institutions implement this policy change at staggered intervals (and implementation is i.i.d between institutions).

How could I simulate data to determine whether or not this policy change impacts the people working in these $\alpha N$ institutions using a generalized DiD approach?

• Are you familiar with other software packages? – london Aug 10 '17 at 21:14