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

        Working...
        X