Announcement

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

  • Running a regression model with a matched sample created by using the propensity score matching command (psmatch2)

    Hi

    I want to know how to run a regression with the matched sample that is generated by propensity score matching.


    Following Nichols (2007), I ran the below syntax.

    Code:
    ssc install psmatch2
    webuse nlswork, clear
    xi i.race i.ind i.occ
    local x "union coll age ten not_s c_city south nev_m _I*"
    regress ln_w union
    regress ln_w `x'
    generate u=uniform()
    sort u
    psmatch2 `x', out(ln_w) ate
    twoway kdensity _ps if _tr || kdensity _ps if !_tr
    generate w=_ps/(1-_ps)

    Then, I found that the below variables are created.
    Click image for larger version

Name:	psmatch2.JPG
Views:	1
Size:	45.8 KB
ID:	1664461


    What should I do to run a regression model with the matched sample? Which variables among those in the above list should be used?

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double _pscore byte(_treated _support) double(_weight _ln_wage) int(_id _n1) float _nn double _pdif float w
                      . . . .                  . 18855     . .                      .          .
                      . . . .                  . 18856     . .                      .          .
      .1518979942853078 0 1 . 1.5432974100112915  7081 15045 1  .00013192873196044008  .17910345
     .22594160766293483 0 1 . 1.4340846538543701  9947 15622 1 .000044892674406549204   .2918922
     .29837961450548467 0 1 2  2.229095697402954 11550 16167 1  .00004452092214601855   .4252722
      .1211451197337607 0 1 .  1.346112608909607  5921 14854 1  .00014691827622007048  .13784428
     .09785298780687657 0 1 .  1.272565484046936  4787 14732 1  .00006424362033422004   .1084668
      .2434324510205307 0 1 . 1.5789542198181152 10375 15755 1  2.388521206653227e-07  .32175905
      .3803096064296204 0 1 .  1.832259178161621 12760 16779 1   .0001592504618531665    .613709
                      . . . .                  . 18857     . .                      .          .
      .2859472728697716 0 1 1   2.41512393951416 11334 16079 1 .000012454254396776498   .4004568
      .4537855178358624 0 1 2 1.9747017621994019 13349 17197 1  .00008154562294021561   .8307827
     .07605691862893403 0 1 .  1.376611351966858  3557 14618 1  .00008105170670252848  .08231775
                      . . . .                  . 18858     . .                      .          .
     .12658892834244545 0 1 .  1.639290452003479  6139 14883 1  .00008610044530887873  .14493625
     .07686889424162502 0 1 .  1.626058578491211  3595 14622 1   .0002738370936795631  .08326975
     .09023314498813359 0 1 . 2.1893205642700195  4394 14696 1   .0000811843148776914   .0991827
                      . . . .                  . 18859     . .                      .          .
      .0678009663508626 0 1 . 1.9501864910125732  3133 14581 1  .00038596283465894277 .072732285
     .30363920279527334 0 1 . 1.5907893180847168 11634 16203 1  .00001937258165363165   .4360372
       .671237773239333 1 1 1 1.8164516687393188 18380 14303 1  .00010801540200511273   2.041712
     .14179703706076682 0 1 1 1.3885185718536377  6703 14986 1 2.2186656171152563e-06   .1652255
                      . . . .                  . 18860     . .                      .          .
     .27339951132528323 0 1 .  1.171182632446289 11079 15984 1  .00003275307815381323   .3762721
      .3789157618553358 0 1 .  2.403588056564331 12743 16770 1   .0001864829850367622   .6100876
                      . . . .                  . 18861     . .                      .          .
     .14534134549606312 0 1 . 1.5634273290634155  6850 15009 1  .00016283055285451487  .17005777
      .6587717720328701 0 1 2  2.050445556640625 14284 18330 1  .00011651753228592021    1.93059
      .4796693299173053 0 1 .  1.414128303527832 13551 17331 1  .00003984224171449391   .9218548
      .3169784122668057 0 1 . 1.5741807222366333 11855 16286 1  .00007955330162945362   .4640826
     .16168452353742768 1 1 5 1.3300836086273193 15113  7470 1 .000017196347848774662  .19286835
     .21368999629851418 0 1 . 1.6412582397460937  9563 15518 1 .000037462752863925974  .27176303
     .37961072981720834 0 1 . 1.8751410245895386 12750 16773 1  .00001844141540530142   .6118912
    .027824902042593344 0 1 1  2.280339241027832  1114 14466 1 .000022656480517014438 .028621286
     .12584775497240577 0 1 .  1.735985517501831  6107 14878 1 .000046167783850054045  .14396548
     .21937448028530002 0 1 1  2.099055051803589  9747 15570 1                      0  .28102398
                      . . . .                  . 18862     . .                      .          .
     .40307327579198926 0 1 .  2.127499580383301 12977 16926 1  .00013048236780760503   .6752475
     .10733946723483076 0 1 .  1.786368489265442  5286 14779 1 .000017571926927709147  .12024668
    .043415368669155935 0 1 .  1.993746280670166  1926 14509 1   .0001972825067100073  .04538581
      .6228757044949054 1 1 . 1.7711929082870483 18138 14209 1  .00037958303201013344  1.6516457
     .17229438034972352 0 1 . 1.6001564264297485  7928 15188 1  .00007479118349096314    .208159
     .05292377524833789 0 1 . 1.2984040975570679  2367 14536 1 .000031455447839237594  .05588122
      .5996454973875622 1 1 2  1.694197654724121 18010 14145 1  8.903920082237171e-06  1.4977863
     .08713129756524693 0 1 . 2.0536231994628906  4209 14678 1   .0000709734794731437  .09544779
                      . . . .                  . 18863     . .                      .          .
     .12044946878459432 0 1 .  1.398716688156128  5896 14851 1   .0001162785799109084  .13694434
                      . . . .                  . 18864     . .                      .          .
      .2613662463904667 1 1 7  .8445333242416382 15900 10775 1                      0   .3538509
       .264531656969091 0 1 . 1.2085809707641602 10867 15922 1  .00010337979756380733   .3596778
                      . . . .                  . 18865     . .                      .          .
      .1180671528785039 0 1 .  2.647691488265991  5786 14839 1 .000015354307922904598  .13387318
      .6709419904513361 1 1 . 1.8164516687393188 18379 14303 1   .0004037981900020249  2.0389779
     .07732020420157619 0 1 . 2.0848610401153564  3623 14624 1 .000037476262819885475   .0837996
     .07202908807844916 0 1 . 1.3927149772644043  3346 14598 1  .00021503582916006236  .07761998
                      . . . .                  . 18866     . .                      .          .
     .29442038361236567 0 1 . 1.7964861392974854 11480 16132 1  .00009709676627123187   .4172745
                      . . . .                  . 18867     . .                      .          .
      .1598214712463388 0 1 .  2.346686363220215  7394 15094 1  .00010945222919328534  .19022323
      .4112588030947968 0 1 1  1.429993748664856 13056 16982 1 .000020457088751812957   .6985392
                      . . . .                  . 18868     . .                      .          .
     .12381962468239464 0 1 .  2.337099313735962  6029 14866 1  .00001946435117242129   .1413175
                      . . . .                  . 18869     . .                      .          .
      .0824189068931832 0 1 . 2.0399205684661865  3920 14652 1  .00021131529156787066  .08982193
     .13846865977374637 0 1 . 1.6071257591247559  6590 14963 1  7.529459031735408e-06   .1607239
      .1643395002746494 0 1 .  2.208197832107544  7578 15127 1  .00007612685973262812   .1966582
      .2383558699993668 0 1 1 1.5750365257263184 10246 15719 1 .000022573515216367523   .3129491
      .2536866771753524 0 1 1 1.9879180192947388 10608 15836 1   7.57540388174327e-06   .3399198
     .31032402415436977 0 1 .  1.796845555305481 11758 16256 1 .000047024951638885426   .4499563
      .0781361980157045 0 1 . 2.2839365005493164  3670 14629 1  .00013242280454846267  .08475894
     .13057598020829364 0 1 . 1.8791414499282837  6309 14905 1 .000050330582916147115  .15018676
     .20388299061690132 1 1 8 2.2194952964782715 15435  9228 1 2.0375805644401446e-06  .25609675
     .09010225249782597 0 1 . 1.6228406429290771  4384 14695 1 2.7264540722049535e-06   .0990246
                      . . . .                  . 18870     . .                      .          .
     .18030830914376803 0 1 .  2.230827569961548  8289 15253 1 .000028010884818491233   .2199709
     .24001791510137724 1 1 4  1.662742018699646 15728 10291 1  5.901905494876125e-07   .3158205
     .21572064824282555 0 1 .  1.645085096359253  9639 15534 1  .00007997699102371692   .2750559
     .16893693351500522 1 1 1 1.2607951164245605 15171  7795 1 .000021400798318554903   .2032781
      .5227196995173717 0 1 2 1.8164516687393188 13803 17545 1  8.639124778664353e-06  1.0952048
                      . . . .                  . 18871     . .                      .          .
                      . . . .                  . 18872     . .                      .          .
     .20016024053971432 0 1 . 2.2859554290771484  9098 15412 1  .00009342572999052057  .25025043
     .20288218572201644 0 1 .  1.919034481048584  9198 15430 1   .0000663919736758889   .2545197
      .3118928492877602 0 1 1  .7335458993911743 11784 16260 1  4.572363963062376e-06    .453262
     .46598167212000574 0 1 . 2.3508753776550293 13439 17259 1  .00042615941374896105   .8725949
      .5466789703335371 0 1 2 1.9652125835418701 13934 17681 1  .00016368501333241525  1.2059423
                      . . . .                  . 18873     . .                      .          .
     .03171925211304205 0 1 .  1.275272011756897  1351 14476 1  .00019303079545768959  .03275832
      .2616354047420537 0 1 . 1.3584250211715698 10782 15901 1  .00007003861912202591   .3543445
     .17411415483422021 0 1 .  1.945910096168518  8008 15202 1 3.0361439739279295e-06   .2108211
                      . . . .                  . 18874     . .                      .          .
      .2250515666148123 1 1 7  1.848618507385254 15614  9923 1 .000012609999829910068  .29040843
     .19053840960531576 1 1 2 1.5943348407745361 15319  8723 1 .000016471161279063562  .23538907
                      . . . .                  . 18875     . .                      .          .
                      . . . .                  . 18876     . .                      .          .
     .11144661023071417 0 1 . 1.1713223457336426  5489 14807 1  .00006548277025870963  .12542477
     .07278765178341298 0 1 . 1.2914314270019531  3386 14602 1  .00017377755407599338   .0785016
      .6611100587267094 1 1 . 2.3844268321990967 18342 14289 1   .0003372403347191577  1.9508106
     .34676447125318866 0 1 . 2.2512917518615723 12304 16491 1  .00002570174334881603   .5308414
      .0929296324591313 0 1 .  2.169053792953491  4526 14711 1  .00010617519626528182   .1024503
    end
    label values _treated _treated
    label def _treated 0 "Untreated", modify
    label def _treated 1 "Treated", modify
    label values _support _support
    label def _support 1 "On support", modify
    Last edited by Sang-Bum Park; 13 May 2022, 09:24.
Working...
X