Announcement

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

  • Matching firms with psmatch2 but unable to get right pre-treatment trend

    Hello everyone,

    I'm working on a difference-in-differences analysis in Stata 18.5 to estimate the impact of a Russian invasion of Ukraine on firms in the neighbouring country - Latvia. Specifically, as a dependent variable, I am looking to profit growth, turnover growth and employment growth. My whole period of analysis is 2018-2023. I divide firms into 2 groups: ever Russian-affiliated and non-affiliated firms. ​​​​​​​In total I have 7330 firms in the control group and only 230 firms in the treatment group, after I drop all those firm which have 0 at any time in any of three outcome variables.

    My goal is to match treated firms (ru_ever1==1) with control firms (ru_ever1==0) based on pre-treatment profit, turnover, employment and sector ensuring parallel trends before the shock year. However, even after matching, my treatment and control groups still show noticeably different pre-treatment trends. I have already tried different ways of matching using psmatch2. I looked to average values over all period before shock, then I tried to look on yearly level as well. I also included or excluded profit, turnover and employment (as a level) and left only growth changes and other way around.

    This is my data and the code I tried as last, however, I got the error message option exact() not allowed. If I try the code without exact() command, my results have no parallel trend.
    Code:
    clear
    input float firmID int year long(sector_id profit) double turnover int employment float(profit_growth turn_growth employment_growth ru_ever1)
     1 2018 11  565777 2918703 11       .        .   . 0
     1 2019 11  540931 2854582 11  -24846   -64121   0 0
     1 2020 11  436467 2681479 12 -104464  -173103   1 0
     1 2021 11  545892 2875439 15  109425   193960   3 0
     1 2022 11  561049 3350082 15   15157   474643   0 0
     1 2023 11  391275 3164302 16 -169774  -185780   1 0
     2 2018 19   52204  623623  3       .        .   . 0
     2 2019 19   66982  980624  3   14778   357001   0 0
     2 2020 19   14825  442861  3  -52157  -537763   0 0
     2 2021 19   47823 1147230  4   32998   704369   1 0
     2 2022 19   66297 1413847  4   18474   266617   0 0
     2 2023 19   11627 1080578  4  -54670  -333269   0 0
    21 2018 19  165780 1595618  3       .        .   . 1
    21 2019 19    8885 1637555  9 -156895    41937   6 1
    21 2020 19 -306173  500182  6 -315058 -1137373  -3 1
    21 2021 19   64207  257900  2  370380  -242282  -4 1
    21 2022 19   60710   27296  2   -3497  -230604   0 1
    21 2023 19       0       0  0  -60710   -27296  -2 1
    75 2018 11  -43965 2532136 51       .        .   . 1
    75 2019 11   17920 2966754 48   61885   434618  -3 1
    75 2020 11    2820 2583578 45  -15100  -383176  -3 1
    75 2021 11  356060 4336728 51  353240  1753150   6 1
    75 2022 11  -38350 3245693 38 -394410 -1091035 -13 1
    75 2023 11 -364821 1603637 38 -326471 -1642056   0 1
    
    preserve 
        drop if year > 2021
        keep if sample_1 == 1
    
    collapse (mean) employment profit turnover employment_growth profit_growth /// 
    turn_growth (first) ru_ever1 (first) sector_id, by(firmID year)
    
    psmatch2 ru_ever1 employment profit turnover, neighbor(1) noreplacement logit ate
    
    save "psm2_weights.dta", replace
    restore
    
    psmatch2 ru_ever1 employment profit turnover, outcome(profit_growth) neighbor(1) noreplacement logit ate 
    sort firmID year
    
    preserve
        keep if !missing(_weight)
        collapse (mean) profit_growth, by(year ru_ever1)
        
        twoway ///
            (line profit_growth year if ru_ever1==1, sort lcolor(blue) lwidth(medium)) ///
            (line profit_growth year if ru_ever1==0, sort lcolor(red) lwidth(medium)), ///
            xline(2022, lpattern(dash) lcolor(black) lwidth(thin)) ///
            legend(order(1 "Treatment" 2 "Control")) ///
            ytitle("Average Profit Growth") ///
            xtitle("Year") ///
            title("Trend in Profit Growth for Matched Firms (Shock=2022)")
    restore
    Could you suggest, what am I doing wrong or what better alternatives I could use to try to get results.

    Thank you in advance!

  • #2
    You're matching on the outcome (sort of), which is generally discouraged.

    Matching does not guarantee pre-trend equality.

    And, you're interested in the conditional pre-trend. So you might estimate a growth rate regression with the Xs.

    Comment


    • #3
      That makes sense, thank you so much George Ford!

      Sorry for the common-sense question, but if I do not get a pre-trend equality but matching works, can I still claim that the firms are similar at some level and use them for comparison? Will that be acceptable for the analysis?

      Comment


      • #4
        I don't think so. PT is the key for DID, but there are some methods to address it if you can't nail it down.

        Comment

        Working...
        X