Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference-in-differences panel estimation with very small N and large T

    Dear Statalist,

    I am using a difference-in-differences (DID) set-up in a monthly panel to estimate the effect of a particular treatment on bond spreads at the country level. More specifically, I am estimating
    Code:
    xtreg spread treat_post covars i.month, fe vce(cluster countryid)
    or, equivalently, using factor variables:
    Code:
    xtreg spread 1.treat#1.post covars i.month, fe vce(cluster countryid)
    where 'treat' is a dummy that equals 1 for the treated countries, 'post' is a dummy that equals 1 for all post-treatment months, 'treat_post' is their interaction, 'covars' is a set of time-varying control variables, and 'countryid' is the country identifier (and panel unit).

    I have two questions:

    1) Does such an estimation makes sense if the number of treated countries is very small, i.e., with only three treated countries or even one single treated country? I have a further 16 non-treated countries in my sample. The time dimension of my dataset is much larger, with about 50 pre-treatment months and about 70 post-treatment months.

    2) If this estimation indeed makes sense (even if only under strong assumptions), is it correct to interpret the coefficient on the interaction variable as the 'average' treatment effect (on the treated) over all post-treatment months?

    Many thanks in advance for your guidance.

    Best,
    Dennis

  • #2
    Dennis:
    welcome to this forum.
    The main issue with your query is: if you have a small N, large T panel dataset, you shoud not go -xtreg-; see -help xtgls-, instead.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks Carlo, I'm also interested in this question and have this sort of data. Could you expand on your reply? I understand xtgls is for allowing more general correlation and heteroskedasticity structures, but why is this particularly applicable to small N, large T panels?

      Comment


      • #4
        Peter:
        welcome to this forum.
        The main issue is that with large N, small T panel dataset autocorrelation (and its structure) rarely bites; conversely, as T becomes the relevant dimension, autocorrelation becomes the main issue (and should be properly modelized via -xtgls-).
        Last edited by Carlo Lazzaro; 16 Nov 2017, 23:49.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Dear Carlo,

          Thanks for pointing out the need to account for autocorrelation in my small N, large T set-up. I now estimate:

          Code:
          xtgls spread treat_post covars i.countryid i.month, panels(het) corr(psar1)
          that is, FGLS which corrects for panel-specific AR1 autocorrelation and heteroskedasticity in the errors. I also added country dummies to account for any unobserved time-invariant heterogeneity (similar as in xtreg, fe).

          In such a set-up is it still correct to interpret the coefficient of the interaction variable 'treat_post' as the diff-in-diff estimate? And, if so, should it be read as the treatment effect (on the treated) averaged over all post-treatment months?

          Best,
          Dennis

          Comment


          • #6
            Dennis:
            there's something in your code I do not understand: looking for interaction effect omitting the conditional main effects of the predictors included in the interaction itself is seldom the way to go.
            Hence, I would rewrite your code as follows:
            Code:
            xtgls spread i.treat##i.post covars i.countryid i.month, panels(het) corr(psar1)
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Dear Carlo,

              Please note that including the main effects (treat and post) will make no difference to the estimation. Stata will drop those variables (or alternatively drop one country dummy and one month dummy) because of perfect collinearity. See the discussion at https://www.statalist.org/forums/for...ferences-model.

              Best,
              Dennis

              Comment


              • #8
                Dennis:
                as per the Stata thread you mention, my previous reply was about your intention (or not) the conditional main effects of the term included in the interaction.
                Usually, I prefer to see Stata omitting variables for collinearity instead of being too parsimonious about my code (this is probably a matter of persoal taste, though).
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X