We have fictional future data on American Kennel Club (AKC) registrations and are interested in how the number of registrations of a dog breed, registered, is affected by dogs being the protagonists in a movie, movie. We conjecture that the number of registrations increases if the dog breed appears as the protagonist in a movie. We also conjecture that registrations increase if the dog has won the Best in Show award from the Westminster Kennel Club, best, in the 10 years before 2034.
There are 141 dog breeds in our sample, which extends between the years 2031 and 2040. At the beginning of the sample, none of the breeds are featured in a movie. This changes in 2034, when four breeds are featured in movies. The next year in which we see an increase of breeds featured in movies is 2036, when seven more breeds are featured. In 2037, there is a substantial increase, with 22 more breeds featured. There is no increase in breeds in movies thereafter.
We first load and xtset our data:
. use https://www.stata-press.com/data/r19/akc
(Fictional dog breed and AKC registration data)
. xtset breed year
Panel variable: breed (strongly balanced)
Time variable: year, 2031 to 2040
Delta: 1 unit
We use xthdidregress with the subcommand twfe to estimate ATETs using the two-way fixed-effects estimator.

© Copyright 1996–2026 StataCorp LLC. All rights reserved.
We are interested in how the ATETs change with the covariate best. We can tabulate the breeds that received Best in Show awards by cohort:

We see that there were no breeds in the 2037 treatment cohort that received the award, which means that moderating effects cannot be estimated for that cohort. However, we can compute moderating effects for the other cohorts.

Results are mixed. In the year 2037 for both the 2034 and 2036 cohorts, with effects of 1057.350 and 1017.032 respectively, there is evidence that the ATETs for breeds with Best in Show award were higher than for other breeds. For the rest of the ATETs, results are inconclusive or negative.