Announcement

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

  • Propensity Score Matching

    I want to follow a paper and I am struggling with propensity score matching. Essentially, my basic regression to analyze whether a supplier_change has an influence on the quality of a produced car is:
    Code:
    regress  car_quality  supplier_change  working_hours price supplier  i.year i.state, vce(cluster ID)
    The three steps indicated in the paper are
    • 1) Create propensity score of a supplier_change with all of the control variables (working_hours price supplier)
    • 2) Match each treatment observation to the single closest control observation from the same year and state and a caliper distance of max. 0.1
    • 3) Re-run the regression with matched sample (although other posts indicate this is problematic).
    So far I have tried for step 1):
    Code:
    probit supplier_change working_hours price supplier 
    predict pscore
    For step 2) I have discovered that many use psmatch2 but I could not get the matching to work...
    Also, I think I cannot combine steps 1 and 2 with psmatch because of the calculation requirements.

    Help is highly appreciated!

  • #2
    Stata has a wide variety of PS matching methods.

    teffects is useful for most purposes..

    teffects psmatch car_quality (supplier_change) (working_hours price supplier i.year i.state)



    Comment


    • #3
      teffects does indeed offer many advantages. However, I am not sure, whether it is possible to include all of the steps in the paper with teffects.

      I ended up with the following solution for my desired three-step-approach:

      Step 1: Propensity Score
      Code:
      logit supplier_change working_hours price supplier  predict pscore
      Step 2: Matching based on propensity score based on closes observation from the same state and year (and a caliper distance of max. 0.1)
      Code:
      egen group_id = group(year state)
      su group_id, meanonly
      gen weight = .
      
      forval i = 1/`r(max)' {
      psmatch2 supplier_change if group_id == `i', pscore(pscore) caliper(0.1)
      replace weight = _weight if group_id == `i'
      }
      Step 3: Re-run regression with matched sample
      Code:
       regress car_quality supplier_change  working_hours price supplier i.year i.state [fweight= weight], vce(cluster ID)
      Last edited by Pietro Lombardi; 07 Feb 2024, 07:01.

      Comment

      Working...
      X