Announcement

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

  • How to Apply a Staggered Difference-in-Differences (DID) Design with Matching

    I'm currently working on a project that examines the impact of Chief Sustainability Officer (CSO) presence on the relationship between pension (hard freezes) and CSR disclosures.

    The design follows a published study framework, where the treatment sample includes the two years before and two years after each firm’s freeze event.
    • Hard Freeze: An indicator variable equal to 1 if a firm freezes its defined benefit pension plan for all employees, and 0 otherwise. Firm-year observations after the freeze year for freeze firms are excluded from all analyses.
    • CSO: A binary variable equal to 1 if the firm has a Chief Sustainability Officer, and 0 otherwise.
    • FREEZE: Coded as 1 for firms that announce a DB pension freeze during the sample period.
    • POST: Equals 1 for the year of the pension freeze and the two years following it, and 0 otherwise.
    I'm planning to implement a staggered Difference-in-Differences (DiD) design to account for variation in treatment timing across firms. To improve covariate balance, I'm also applying matching. For each firm-year observation in the treatment group, I’m identifying a matched control firm from the same four-digit SIC industry, with similar firm size and year.im not sure how can i do this in STATA
    HTML Code:
     ----------------------- copy starting from the next line -----------------------
    [CODE]
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long id float(year hardfreezes freeeze posts postsXfreeze)
    2 2004 0 0 0 0
    2 2005 0 0 0 0
    2 2006 0 0 0 0
    2 2007 0 0 0 0
    2 2008 0 0 0 0
    2 2009 0 0 0 0
    2 2010 0 0 0 0
    2 2011 0 0 0 0
    2 2012 0 0 0 0
    2 2013 0 0 0 0
    2 2014 0 0 0 0
    2 2015 0 0 0 0
    2 2016 0 0 0 0
    2 2017 0 0 0 0
    2 2018 0 0 0 0
    2 2019 0 0 0 0
    2 2020 0 0 0 0
    2 2021 0 0 0 0
    2 2022 0 0 0 0
    3 2004 0 1 . .
    3 2005 0 1 . .
    3 2006 0 1 . .
    3 2007 0 1 . .
    3 2008 0 1 . .
    3 2009 0 1 . .
    3 2010 0 1 0 0
    3 2011 0 1 0 0
    3 2012 1 1 1 1
    3 2013 . 1 1 1
    3 2014 . 1 1 1
    3 2015 . 1 . .
    3 2016 . 1 . .
    3 2017 . 1 . .
    3 2018 . 1 . .
    3 2019 . 1 . .
    3 2020 . 1 . .
    3 2021 . 1 . .
    3 2022 . 1 . .
    4 2004 . . . .
    4 2005 . . . .
    4 2006 . . . .
    4 2007 . . . .
    4 2008 . . . .
    4 2009 . . . .
    4 2010 . . . .
    4 2011 . . . .
    4 2012 . . . .
    4 2013 . . . .
    4 2014 . . . .
    4 2015 . . . .
    4 2016 . . . .
    4 2017 . . . .
    4 2018 . . . .
    4 2019 . . . .
    4 2020 . . . .
    4 2021 . . . .
    4 2022 . . . .
    5 2004 . . . .
    5 2005 . . . .
    5 2006 . . . .
    5 2007 . . . .
    5 2008 . . . .
    5 2009 . . . .
    5 2010 . . . .
    5 2011 . . . .
    5 2012 . . . .
    5 2013 . . . .
    5 2014 . . . .
    5 2015 . . . .
    5 2016 . . . .
    5 2017 . . . .
    5 2018 . . . .
    5 2019 . . . .
    5 2020 . . . .
    5 2021 . . . .
    5 2022 . . . .
    6 2004 0 0 0 0
    6 2005 0 0 0 0
    6 2006 0 0 0 0
    6 2007 0 0 0 0
    6 2008 0 0 0 0
    6 2009 0 0 0 0
    6 2010 0 0 0 0
    6 2011 0 0 0 0
    6 2012 0 0 0 0
    6 2013 0 0 0 0
    6 2014 0 0 0 0
    6 2015 0 0 0 0
    6 2016 0 0 0 0
    6 2017 0 0 0 0
    6 2018 0 0 0 0
    6 2019 0 0 0 0
    6 2020 0 0 0 0
    6 2021 0 0 0 0
    6 2022 0 0 0 0
    8 2004 0 0 0 0
    8 2005 0 0 0 0
    8 2006 0 0 0 0
    8 2007 0 0 0 0
    8 2008 0 0 0 0
    end
    label values id id
    label def id 2 "A", modify
    label def id 3 "AAL", modify
    label def id 4 "AAP", modify
    label def id 5 "AAPL", modify
    label def id 6 "ABBV", modify
    label def id 8 "ABT", modify
    [/CODE]
    ------------------ copy up to and including the previous line ------------------
    
    Listed 100 out of 8829 observations
    Use the count() option to list more


Working...
X