Announcement

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

  • One-to-One Matching in STATA

    Dear community

    I intend to do one-to-one matching in STATA based on two variables and a condition. There are firms (each classified as family and non-family using a dummy variable), however family firms occupy 70% of the entire dataset. Therefore, I am trying to create a matched sample using non-family firms as the baseline, findind one-to-one match on certain parameters for subsequent analysis.

    The two parameters include - Year and Industry Code. Further, I am including a conditional logic, which says that the net sales differential between the matched pair should not exceed 5 percent.

    Using the existing joinby command, I am generating many-to-many matches and that too not unqiue for a given family/non-family firm. Therefore, I wanted someone to advise about how should I proceed with my analysis?

    Below is the sample data for you to visualize the problem at hand:
    Company Code Firm Year Industry Code Dummy (Family/Non-Family) Net Sales
    11 ABC 1997 8 1 219
    11 PQR 1998 8 1 300.2999878
    11 XYZ 1997 8 0 225.8999939

  • #2
    You can create a dummy variable based on which you want to do exact matching:
    egen exactmatch = group(A B ...)

    Then you can create a propensity score (if you want)
    logit treat $predictors
    predict propscore

    Finally you can match based on the propensity score within levels of the exactmatch dummy
    gen weight = .
    levelsof exactmatch, local(gr)
    foreach j of local gr {
    psmatch2 treat if exactmatch == `j', kernel pscore(propscore) com cal(0.05)
    replace weight = _weight if weight == .
    }

    Comment

    Working...
    X