Announcement

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

  • #31
    UPDATED VERSION AVAILABLE:

    A new updated version of the lpdid command (version 1.0.2) has just been uploaded in SSC (as always, many thanks to Prof. Baum).

    Update the command by typing

    Code:
    ssc install lpdid, replace
    The main new features:
    1. One-off treatments: The nonabsorb() option now has a [oneoff] suboption, to deal with repeated “one-off” (or “shock”) treatments. These are treatments that last one period by construction (like for example hurricanes), although treatment can still be repeated and effects can still be long lasting, heterogeneous and dynamic. This will be useful to researchers working on, for example, the effects of natural disasters or other ‘one-off’ shocks.
    2. Faster execution of reweighted estimator with controls: The reweighted version (implemented through the [rw] option) is now always fast to run, including with non-absorbing treatment, additional control variables and/or absorbed fixed effects. In these settings, the previous version was sometimes slow, while the new one is much faster. (This was achieving by relying on the -listreg- command by Ben Jann to implement regression adjustment specifications more efficiently).
    3. Wild bootstrap: Wild bootstrap is now available also with reweighting and control variables.
    4. Bug fix: Prior versions of the program which specified both [pmd] and [nonabsorb] had a wrong sample definition which resulted in most observations being dropped.
    5. Bug fix: Prior versions of the program which specified a control variable, [rw], and a user-supplied weight produced a syntax error.
    Note the command dependencies now include -listreg- so you need to install -listreg- from ssc (ssc install listreg, replace) before using lpdid.

    More detail at https://github.com/danielegirardi/lpdid/

    My coauthor Alex Busch and I hope these extensions are useful!

    Daniele

    Comment


    • #32
      Hi everyone, I'm using the command for LP-DiD and I was wondering if it includes an automatic placebo test option.

      Comment


      • #33
        VERSION 1.0.3 NOW AVAILABLE

        Thanks as always to Kit Baum, version 1.0.3 of -lpdid- is now available on SSC.

        To update:

        Code:
         ssc install lpdid, replace
        This version fixes two small bugs (many thanks to Jeff Wooldridge and Mengfei Zhou for helping us spot them). Both bugs affected the pmd() option, which uses an average of pre-treatment periods rather than the last period before treatment as the base period in differencing the outcome. The bugs could occur in datasets with missing values for the outcome, or in datasets with repeated 'one-off' treatments.

        1. pmd(max) with missing outcome values.

        Previous versions built the pre-treatment baseline by dividing the cumulative sum of the outcome by the running observation number, rather than by the number of periods in which the outcome is actually observed. Where the outcome had missing values, the denominator was therefore too large and the baseline was biased towards zero. In the extreme case of no observed pre-treatment outcome at all, the baseline was zero rather than missing. This is all solved in the new version.

        2. pmd() combined with the oneoff suboption of nonabsorbing().

        If treatment is non-absorbing, to ensure the PMD baseline is not contaminated by an earlier treatment, the command requires the treatment to be inactive between t-1 and t-(PMD+L-1). Previous versions always tested this on the differenced treatment indicator. That is correct for persistent treatment, where contamination arises from a switch, but too strong for one-off treatment, where an event lasts a single period and the return to zero in the next period is not a new episode. Units treated at t-(PMD+L) were therefore dropped even though the one-off clean control condition regards them as clean again. The condition is now stated on the level of the treatment indicator, matching the clean control condition already used in that case.

        A simple symptom of the old behaviour was that with one-off treatment, pmd(1) did not reproduce ordinary first differencing exactly (as it should have). It now does.

        In addition to fixing these two bugs, in version 1.0.3 the PMD and pooled outcome transformations are now computed in double precision rather than as floats. This is immaterial in most applications, but might make a small difference if the outcome has very large levels.

        Who is affected by the changes: Only users who specify the pmd() option in datasets that have missing values or in datasets with "one-off treatments" can be affected significantly by this update. If you do not use pmd(), your event study estimates are unchanged and the pooled estimates can differ only in the last digits. If you do use pmd(), particularly with missing outcome values or with one-off treatment, it is worth re-running your estimates to check that they were not affected by these bugs.

        As in previous versions, -lpdid- requires Stata 13 or later and the user-written packages -reghdfe-, -boottest-, -egenmore- and -listreg-.

        Reference and examples:
        Dube, A., D. Girardi, O. Jorda and A. M. Taylor. 2025. "A Local Projections Approach to Difference-in-Differences." Journal of Applied Econometrics, https://doi.org/10.1002/jae.70000
        https://github.com/danielegirardi/lpdid/

        Comment


        • #34
          NEW VERSION (1.1.0) OF LPDID COMMAND NOW AVAILABLE

          Thanks as always to Prof. Baum, version 1.1.0 of -lpdid- is now available on SSC.

          This is the largest release since 1.0.0. It adds a new estimator of the overall average effect (in addition to the pooled LP-DiD estimates), a pre-trend test, and a few other accuracy & precision upgrades.

          To update:
          Code:
          ssc install lpdid, replace


          Main new features & changes:
          • The pooled estimates are no longer reported by default. They are now requested through a new pooled option.
          • Four new options:
            • aggregate_average Reports an aggregate estimated average effect across all treated observations in the post-treatment window, with SEs, p-values, and CIs. This is computed as a weighted average of event study coefficients, with weights proportional to treated observations. Statistical inference uses Mata-based influence functions or (when wild bootstrap is requested) a stacked regression. See the new help file for the differences between this and the pooled LP-DiD estimates.
            • pretrend_test Reports a joint test of the null hypothesis that all pre-treatment coefficients are zero. It uses Mata-based influence functions or (when wild bootstrap is requested) a stacked regression.
            • untreated_before Assumes every unit is untreated before it enters the panel, rescuing early observations whose earlier treatment history cannot be verified. Without this option, the new default requires all treatment values in the relevant window to be observed and verifiable. Relevant only with nonabsorbing().
            • pooled requests the pooled LP-DiD estimates, which 1.0.3 and earlier reported by default and are now optional.
          • Stricter nocomp option: In previous releases, nocomp ruled out composition changes caused by a control entering treatment, but let the sample vary when the outcome at a given horizon was missing. It now also eliminates composition effects due to missing values. As a result, the nocomp option now holds the estimation sample fully fixed across all horizons, even in presence of missing values.
          There are also several other smaller adjustments and a few bug fixes. A full list of changes is available in the changelog:
          https://github.com/danielegirardi/lp...D_CHANGELOG.md

          As in previous versions, -lpdid- requires Stata 13 or later and the user-written packages -reghdfe-, -boottest-, and -listreg-. The -egenmore- package is no longer required.

          Reference and examples:

          Dube, A., D. Girardi, O. Jorda and A. M. Taylor. 2025. "A Local Projections Approach to Difference-in-Differences." Journal of Applied Econometrics, https://doi.org/10.1002/jae.70000

          https://github.com/danielegirardi/lpdid/
          Last edited by Daniele Girardi; 22 Sep 2026, 03:56.

          Comment

          Working...
          X