# Subsample analysis based on country-level indices?

In a generalized Difference-in-Difference setting from Dasgupta,2019 for multiple event dates (laws staggered implementation)

The baseline equation:

$$Y_{it}$$ = $$\alpha$$ + $$\beta$$ $$(Leniency Law)_{kt}$$ + $$\deltaX_{ikt}$$ + $$\theta_t$$ + $$\gamma_i$$ +$$\epsilon_{it}$$ (1)

The variable of interest here is $$(Leniency Law)_{kt}$$. This variable equals 0 before the passage of the leniency law in country $$k$$, and 1 afterward. Simplistically speaking, it is postxtreatment in DID setting, relating to a well-explained idea of Thomas Bilach here about the switching "on" and "off" of treatment-or-control status based on treatment year at here( this is where the baseline regression being explained well) and here.

In short, Thomas Bilach's idea is:

Once the exposure period isn't well-defined we must regress the outcome on unit fixed effects, time fixed effects, and a treatment dummy which 'turns on' in any unit-time combination where the policy is in effect, 0 otherwise.

Now, I want to perform the subsample test for time-variant and time-invariant indices. I have two questions here:

1. Regarding the time-variant index (like developed or developing countries), we may add one dummy variable that firms in countries that have this index higher than the median in the baseline year equalling to 1, and 0 otherwise. Then, we can run the equation (1) above for these two subsamples, and then compare the coefficients of the $$Leniency Law$$ in these two groups together. This way of doing things makes sense to me. However, is there any reference of justification for this approach?

2. The approach above is applied for the time-invariant index. How about a time-variant index (e.g., for example, the World Government Indicator (WGI)). So, what should we separate the subsample based on this index? From my point of view, there is one approach that I can think of. That is, in each year during the sample period, I will manually rank the countries by this index and set 1 for the "higher-than-median" sample and 0 otherwise. At the end, I will run the equation (1) above for these two subsamples separately and compare the coefficients of $$Leniency Law$$. However, I am wondering if there is any justification and reference for this approach as well.

Regarding your question, you can see the answer of @Ander from here

As a first stage you would probably want to run the first equation separately for the different samples, size1 and size2:

(i) $$Y_{it}$$ = $$\alpha$$ + $$\beta$$ $$(Leniency Law)_{kt}$$ + $$\deltaX_{ikt}$$ + $$\theta_t$$ + $$\gamma_i$$ +$$\epsilon_{it}$$ if Size==1

Assume this gives you $$(Leniency Law)_{kt}$$ = 0.1

(ii) $$Y_{it}$$ = $$\alpha$$ + $$\beta$$ $$(Leniency Law)_{kt}$$ + $$\deltaX_{ikt}$$ + $$\theta_t$$ + $$\gamma_i$$ +$$\epsilon_{it}$$ if Size==2

Assume this gives you $$(Leniency Law)_{kt}$$ = 0.5. If your suspicion is true, then these two $$(Leniency Law)_{kt}$$ should be different.

But please notice that you need to have some quick or simple test for parallel trend for the subsample as in a standard DID.

The answer misses the most important point about the difference in differences setting, namely the additional assumptions required for the parallel trends. Now they not only need to be parallel for the treated and control group municipalities, but instead you need parallel pre-treatment trends for the large treated, small treated, large control, and small control municipalities