Announcement

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

  • using one to one matching with replacement in stata

    Hi, I am trying to use one to one matching with replacement in order to estimate the impact of x. However, I want to use matches without calculating propensity scores, and directly taking similar matches using caliper (0.5 SD of each covariates) to improve matching quality, as done in this study (Yang et al., 2020). They have done it in R, I would like to know how I can do it in STATA.

    If I am right, Nearest Neighbor Matching is the one to go. How do I compare between between treated and untreated variable after matching using NNM? I can see that using pstest is one way to find out, but I do not want to generate propensity scores at all. Just simple one to one matches. Any suggestion?

    Referece:
    Yang, H., Lupi, F., Zhang, J., & Liu, J. (2020). Hidden cost of conservation: A demonstration using losses from human-wildlife conflicts under a payments for ecosystem services program. Ecological Economics, 169, 106462.
    Last edited by Sanjay Sharma; 03 May 2021, 11:11.

  • #2
    there are a number of user-written programs that can help with this, including -kmatch-, -ultimatch- and -vmatch-; use -search- or -findit- to locate, download and install

    depending on exactly what you want to do, it may well be possible to write some simple code but sample data (using -dataex-) and a clear set of rules (e.g., which variables do you want to match on; are there any calipers and if so, what, etc.) would be needed

    Comment


    • #3
      Thank you for replying. I want to see difference between treatment group (grow_off_tomato = 0 Vs 1) after matching based on following variables: age, education, male, tot_farmsize, off_farm_employment, hh_type.
      • I want to apply a caliper of 0.5 SD of each matching covariates
      • After matching, I want to see how much difference there is between treated and untreated group- expecting no significant difference.
      • Further, I want to see the effect of treatment (grow_off_tomato) on Total_HH_income
      Thanks again for your response.



      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input byte grow_off_tomato float(Total_HH_income age education male tot_farmsize off_farm_employment hh_type)
      0  940000 60  0 0    .5 1 1
      0  660000 56  3 0   .25 1 1
      0   39000 62  5 1 1.875 1 1
      0  517000 68  0 0   .75 1 1
      0       0 60  0 1  .125 1 0
      0  100000 55  5 1   .25 1 0
      0   90000 52  5 1    .5 1 1
      0  195800 50  3 1  .125 1 1
      0  489300 45  5 1   .25 1 0
      0   39000 40  8 1   .25 1 1
      0   11600 70  5 1 1.125 1 1
      0  192000 58  7 1   .25 1 1
      0  858000 35  8 0  .875 1 1
      0  300000 45  5 0  .375 1 1
      0   29000 64  0 1  .875 1 1
      0   40400 82  0 1  .375 1 1
      0   73000 79  3 1     1 1 1
      0   15500 55  3 0  .625 1 0
      0   14250 55  8 1   .25 1 1
      0   63000 55  6 1   .25 1 1
      0   50000 60 10 1   .25 1 1
      0   40000 38  7 0     0 1 1
      0  219850 52  0 0  .875 1 0
      0  257000 45  5 0 3.375 1 0
      0   10000 30  3 0   .25 1 1
      0   73000 65  0 0   .25 1 1
      0  248000 78  3 1 4.125 1 1
      0   90000 60  0 0  .125 1 0
      0  224000 67  0 0  .125 1 1
      0   24000 72  0 1     1 1 1
      0  782000 61  5 1  .125 1 1
      0   24000 59  3 0  .125 1 1
      0  300000 65  5 1  .625 1 1
      0   85000 49  5 1  .625 1 1
      0   36000 40 10 1   .75 1 1
      0       0 55 10 1  .375 1 1
      0 2947750 49 10 1  2.95 1 1
      0  895000 71  5 1     1 1 0
      0  192000 40  4 1 1.375 1 1
      0   50000 58  3 1    .5 1 1
      0  231000 60  0 0    .3 1 1
      0  262000 63  0 0   .05 1 0
      0   47000 60  8 1    .5 1 1
      0  800000 45 10 1   .25 1 1
      0   37000 35  7 0    .2 1 1
      0   31000 48  5 1    .2 1 1
      0  425000 56  4 1   .25 1 1
      0  434000 34  5 1   .75 1 1
      0  424000 50  5 0  .875 1 1
      0  249200 34  5 1  .125 1 1
      0  520000 58 10 1  .375 1 1
      0  190000 53  5 1    .2 1 1
      0   58000 68  0 0  .125 1 1
      0  300000 48  0 0    .1 1 0
      0  469000 21 10 0  .375 1 1
      0       0 45  5 0    .2 1 1
      0  407000 38  5 0   .25 1 0
      0  300000 41  5 0  .125 1 0
      0  457500 59  2 0  .125 1 1
      0       0 65  0 1  .125 1 1
      0   51000 41 10 0 1.375 1 1
      0   32000 58  4 1    .5 1 1
      0  982000 70  0 0  .625 1 0
      0  538000 78  0 1   .25 1 1
      0  240000 35 10 1  .625 1 1
      0       0 64  0 1    .5 1 1
      0   50000 30  5 0  .125 1 1
      0  368000 60  4 1  .125 1 1
      0  915500 19  7 0  .625 1 1
      0  808000 68  8 1   .75 1 1
      0  700000 63 10 1    .1 1 1
      0 1200500 65 12 1     2 1 1
      0  116000 22 12 0   .15 1 0
      0   50000 62  5 1    .5 1 1
      0  250000 40 12 0   .25 1 0
      0  420000 60  5 1 1.125 1 1
      0  512000 42  5 0  .625 1 1
      0  878000 52  5 0    .5 1 1
      0  300000 51 12 1 1.125 1 1
      0  782000 61  5 1     1 1 1
      0   50000 66  5 1    .7 1 1
      0  637000 70  0 0  .625 1 1
      0  160000 42  9 0  .375 1 0
      0   43000 68  0 0    .1 1 1
      0  527000 65  0 0  .625 1 0
      0   10000 30 11 0   .55 1 1
      0 1070000 56  5 1   .25 1 1
      0   34000 39 10 1   .25 1 1
      0  107000 30 11 1   1.9 1 1
      0  200000 45  5 0  .125 1 1
      0  997000 45 10 1  .375 1 1
      0       0 40  5 0    .2 1 1
      0       0 24  9 0   .05 1 1
      0   36000 18 11 1   2.5 1 0
      0 1887000 57  3 0   1.7 1 0
      0   25200 73  0 0 1.375 1 0
      0  420000 61  0 1    .7 1 1
      0   26000 45  8 1    .5 1 1
      0  181000 38  9 0  .125 1 1
      0  274000 37 15 1   .05 1 1
      end

      Comment

      Working...
      X