I am trying to understand this paper by David McKenzie. One of the themes in the paper is how level of autocorrelation influences the choice between Difference-in-Differences, ANCOVA, and simple treatment-control post comparison in the context of an experiment on panel data.

Under the simplifying assumption that the autocorrelation between all points in time is constant (cov(e_t, e_t-1) =cov(e_t, e_t-k) = rho for all k) and the disturbances are homoscedastic, there are some formulas that give the variance of the three estimators as function of the sample size, the number of pre and post periods, the sample sizes, and rho. David also gives some examples from his own work about what kinds of autocorrelation he has come across for various types of data from blood pressure to firm profits and test scores.

It is not clear to me how to test this assumption with my own data. What would be the Stata command that could allow me to get a plot like this and to test that rho is constant and is the same in treatment and control groups:

Array