Announcement

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

  • Propensity score matching (PSM) in Ppanel data

    Dear all,

    Could you help me on how to do PSM in panel data setting?
    I have panel data of 100 countries for 2000-2023. I try to establish causal effect of how an increase in the variable "inflow" affects "y". I am exploring whether I can use PSM on this. I am thinking to divide countries based on quartile of inflow. Countries at the top quartile are the treatment group, and countries at the bottom quartile are the control group. I think PSM is mainly used for cross-section settings. So, in this case, at the bare minimum, I can just collapse the data into their mean and then do PSM.

    However, I think I will lose a lot of information by collapsing the data. How to do it in panel data setting? Is it enough just by controlling for year in the logit regression below?

    Code:
    xtile inflow_quartile = inflow, nquantiles(4)
    gen inflow_quartile_treatment = .
    replace inflow_quartile_treatment =1 if inflow_quartile ==4
    replace inflow_quartile_treatment =0 if inflow_quartile ==1
    
    teffects psmatch (y) (inflow_quartile_treatment x1 x2 x3 i.year)
    Or is PSM not the appropriate method here because there is no particular intervention/treatment year (i.e., no before and after treatment years)? Here is my sample data. Thank you.


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str3 country int year float(y x1 inflow x2 x3)
    "ABW" 2000 70.68687        . .0578504 10.33214 11.39753
    "ABW" 2001 69.39433        . .0704047 10.35542 11.41521
    "ABW" 2002 68.66646        . .0677734 10.33398 11.42716
    "ABW" 2003 70.06308        . .0133918 10.33505 11.43713
    "ABW" 2004 67.76537  1.28139 .0646656 10.39644 11.44614
    "ABW" 2005 76.97498   1.2876  .034739 10.38257 11.45617
    "ABW" 2006 76.44847  1.27982 .0419537 10.38196 11.46799
    "ABW" 2007 74.91105   1.2466 .1940339 10.40011 11.48027
    "ABW" 2008 73.58086  1.27092 .2377671 10.40589 11.49268
    "ABW" 2009 74.63802  1.49666 .3543857 10.26938 11.50501
    "ABW" 2010 75.24647  1.24645  .202644 10.23035 11.51633
    "ABW" 2011 84.68678  1.23643 .2011958 10.25409 11.52572
    "ABW" 2012 83.54165  1.24759 .1858489 10.23553 11.53383
    "ABW" 2013 85.34297  1.22133 2.131596 10.29037 11.54132
    "ABW" 2014 84.60656   .88789 2.100722 10.26746 11.54823
    "ABW" 2015 72.98075  .848053 1.810387 10.25482 11.55461
    "ABW" 2016 70.41933  .853405 1.765777 10.26597 11.56051
    "ABW" 2017 71.25561  .875805 1.815417 10.32871 11.56589
    "ABW" 2018 72.96078  1.01347  1.12693  10.3473 11.57084
    "ABW" 2019 72.10898  .987837 1.009012 10.31948 11.57536
    "ABW" 2020 68.83556  1.07522 1.367148 10.04393  11.5767
    "ABW" 2021 70.83038  1.08404 1.155124 10.28842 11.57625
    "ABW" 2022 77.33465  1.10533 1.079906 10.38875 11.57538
    "ABW" 2023        .        .        .        .  11.5738
    "AFG" 2000        . -2.17395        . 5.760744 16.78813
    "AFG" 2001        .        .        .  5.65425 16.79555
    "AFG" 2002        . -1.58769        . 5.841293 16.86004
    "AFG" 2003        . -1.17577        . 5.850521 16.93546
    "AFG" 2004        . -.945146        . 5.825231 16.97479
    "AFG" 2005        . -1.22882        0 5.895894 17.01055
    "AFG" 2006        . -1.47365        0 5.906685 17.05195
    "AFG" 2007        . -1.44011        0 6.018256 17.06988
    "AFG" 2008        .  -1.5278 .8857237 6.036732  17.0899
    "AFG" 2009        . -1.50775 1.133162 6.194962 17.12552
    "AFG" 2010        . -1.47832 2.385158 6.300216 17.15447
    "AFG" 2011        .  -1.4741 1.005985 6.267575 17.19136
    "AFG" 2012        . -1.37554 1.102187 6.346822 17.23214
    "AFG" 2013        . -1.39949 1.723211 6.366649 17.26681
    "AFG" 2014        .  -1.3593 1.236114 6.356954 17.30338
    "AFG" 2015        . -1.39618 1.821996 6.340149 17.33459
    "AFG" 2016        . -1.29025 3.464843 6.336686 17.36041
    "AFG" 2017        . -1.38897 4.387093 6.334146 17.38907
    "AFG" 2018        . -1.50135 4.450986 6.317117 17.41793
    "AFG" 2019        . -1.51861 4.407428 6.326402 17.44701
    "AFG" 2020 36.28908 -1.60951 3.953297 6.271262 17.47836
    "AFG" 2021 37.06956 -1.66956 2.243017 6.010327 17.50687
    "AFG" 2022 54.50543 -1.87955 2.551344 5.920548 17.53222
    "AFG" 2023        .        .        .        . 17.55887
    "AGO" 2000        . -1.07503        . 7.554598 16.61243
    "AGO" 2001        .        .        . 7.562945 16.64528
    "AGO" 2002 48.21675 -1.13216        . 7.657685 16.67863
    "AGO" 2003 49.57989 -1.12422        . 7.653014 16.71277
    "AGO" 2004 45.19959 -1.32887        . 7.721859 16.74783
    "AGO" 2005 41.06469 -1.11022        0 7.826305 16.78341
    "AGO" 2006  31.1573 -1.38105        0 7.899688 16.81933
    "AGO" 2007 40.15429 -1.20501        0 7.994408 16.85572
    "AGO" 2008 48.88968 -1.06139 .0927098 8.063589 16.89243
    "AGO" 2009 63.68884  -.94507 .0002309 8.035218 16.92937
    "AGO" 2010 42.58052 -1.13827 .0214465 8.040914 16.96671
    "AGO" 2011 39.31256 -1.19323 .0001832 8.037457  17.0043
    "AGO" 2012 35.85997 -.988945 .0315095 8.081839 17.04189
    "AGO" 2013 36.06485 -1.24268 .0276845 8.092841 17.07924
    "AGO" 2014 34.63789  -1.0559 .0227784 8.103095 17.11609
    "AGO" 2015 33.13392 -.928497 .0122819  8.07631 17.15227
    "AGO" 2016 25.24567 -.971014 .0075586 8.014308 17.18813
    "AGO" 2017 23.25272 -.951665 .0019245 7.977325 17.22364
    "AGO" 2018 25.54172 -1.00512 .0019877  7.92943 17.25828
    "AGO" 2019 17.03878 -1.12856 .0048598  7.88843 17.29224
    "AGO" 2020 27.62749 -1.25839 .0166037 7.797712 17.32492
    "AGO" 2021 26.71922 -1.12808 .0189927 7.777973 17.35658
    "AGO" 2022 25.29943 -1.04043 .0134153 7.777005 17.38755
    "AGO" 2023 26.66148        . .0142424 7.755219 17.41786
    "ALB" 2000 43.33879  -.91778 17.17641  7.58115 14.94337
    "ALB" 2001 45.15761        . 17.82973 7.670208 14.93398
    "ALB" 2002 47.57945 -.624333 16.87117 7.717573 14.93098
    "ALB" 2003 46.17318 -.563987   15.838 7.775126 14.92724
    "ALB" 2004 44.82963 -.408372 16.15481 7.832986 14.92306
    "ALB" 2005 47.85936 -.696387 16.01704 7.891895 14.91794
    "ALB" 2006 49.05748 -.580953 15.28165 7.955554 14.91164
    "ALB" 2007 54.95422 -.427723 13.74895 8.021222 14.90408
    "ALB" 2008 52.14933 -.367063 14.48281 8.101216 14.89641
    "ALB" 2009 49.85416 -.255941 14.26161 8.140948 14.88967
    "ALB" 2010 48.56395 -.279453 13.30246 8.182312  14.8847
    "ALB" 2011 51.97703 -.202177 12.04024 8.210137 14.88201
    "ALB" 2012 47.57271 -.268925 11.52428 8.225862 14.88036
    "ALB" 2013  46.9574 -.323876 10.03307 8.237664 14.87853
    "ALB" 2014 47.19484 -.048918  10.7423 8.257323 14.87646
    "ALB" 2015 44.53362   .02824 11.33644 8.282181 14.87354
    "ALB" 2016 45.83196  .029821 11.01077 8.316391 14.87195
    "ALB" 2017 46.62445  .098736 10.07565 8.354631 14.87103
    "ALB" 2018 45.23623   .08065 9.621069 8.396506 14.86856
    "ALB" 2019 44.97493 -.062144 9.562582 8.421428  14.8643
    "ALB" 2020 37.17194  -.15488 9.668357 8.393592 14.85856
    "ALB" 2021 44.70882  -.03536 9.583389 8.488199 14.84929
    "ALB" 2022 47.75426  .065063 9.226106 8.547779 14.83713
    "ALB" 2023 44.91489        . 8.573538 8.593077 14.82565
    "AND" 2000        .  1.38049        .  10.4312 11.09888
    "AND" 2001        .        .        . 10.48354 11.12461
    "AND" 2002        .  1.36772        .  10.4843 11.16831
    "AND" 2003        .  1.34904        . 10.52542 11.21056
    "AND" 2004        .  1.50376        .  10.5635 11.25069
    "AND" 2005        .   1.2876        0 10.57916  11.2876
    "AND" 2006        .   1.5384        0 10.62119 11.29254
    "AND" 2007        .  1.50177        0 10.66253 11.26662
    "AND" 2008        .  1.52841        0 10.63274 11.23921
    "AND" 2009        .   1.5362        0 10.60764 11.20982
    "AND" 2010        .  1.51272        0  10.6198 11.17772
    "AND" 2011        .  1.49892        0 10.63312 11.16432
    "AND" 2012        .  1.52335        0 10.57579 11.17062
    "AND" 2013        .  1.53269        0  10.5347 11.17559
    "AND" 2014        .  1.71228        0 10.55588 11.17914
    "AND" 2015        .   1.7409        0 10.56838 11.18089
    "AND" 2016        .  1.80549        0  10.5938 11.19189
    "AND" 2017        .  1.87641        0 10.57953 11.20962
    "AND" 2018        .  1.87927        0 10.57949 11.22542
    "AND" 2019        .  1.85207 .6687481 10.58187 11.24299
    "AND" 2020        .  1.74941 1.640135 10.44565 11.26061
    "AND" 2021        .  1.74925  1.59418 10.50824 11.27763
    "AND" 2022        .   1.4953        0 10.58963 11.28758
    "AND" 2023        .        .        0 10.60067 11.29088
    "ARE" 2000        .  .747685        .  11.0217 15.00193
    "ARE" 2001 40.70535        .        . 10.98243  15.0551
    "ARE" 2002 43.56831  .796372        . 10.95582 15.10575
    "ARE" 2003 46.37697  .537255        . 10.99187 15.15404
    "ARE" 2004 53.05488  .687684        . 11.03714 15.20014
    "ARE" 2005 51.96756  .716674        . 11.01499  15.2697
    "ARE" 2006 50.84287  .945923        . 10.97398 15.40453
    "ARE" 2007 64.41405  .943044        . 10.82405 15.58581
    "ARE" 2008 69.64565  .898491        . 10.68148  15.7598
    "ARE" 2009 73.80862   1.0092        .  10.4934 15.89403
    "ARE" 2010 59.49942  .918635        .  10.4499 15.95343
    "ARE" 2011 59.85406  1.07076        . 10.49925 15.96439
    "ARE" 2012 62.33551  1.16282        . 10.50692  15.9748
    "ARE" 2013  63.0929  1.19077        . 10.54626 15.98478
    "ARE" 2014 67.10571   1.4526        . 10.57751 15.99434
    "ARE" 2015 71.91305  1.50059        . 10.63405 16.00346
    "ARE" 2016 73.23997  1.41036        . 10.67954  16.0121
    "ARE" 2017 74.46103  1.40844        . 10.67867 16.02029
    "ARE" 2018  65.9258  1.42626        . 10.68382 16.02819
    "ARE" 2019  70.7194  1.38032        . 10.68706 16.03598
    "ARE" 2020  70.6453  1.28574        . 10.62804 16.04416
    "ARE" 2021        .  1.36593        . 10.66232 16.05251
    "ARE" 2022        .  1.29996        . 10.72981 16.06059
    "ARE" 2023        .        .        . 10.75529 16.06858
    "ARG" 2000 11.63607 -.028039 .0303809 9.275446 17.42834
    "ARG" 2001 10.27325        . .0705628 9.219365 17.43933
    "ARG" 2002 13.37013 -.228479 .2114424 9.093281 17.45007
    "ARG" 2003 14.71381  -.03422 .2143009 9.167639 17.46039
    "ARG" 2004 16.84503  .015197 .1893501 9.243934 17.47054
    "ARG" 2005  17.3054 -.097979 .2174179 9.318415 17.48088
    "ARG" 2006 17.40679 -.033916 .2324741 9.385466 17.49122
    "ARG" 2007 18.28242 -.012533 .2109338 9.461651 17.50129
    "ARG" 2008 18.34177 -.123509 .1950294 9.491499 17.51121
    "ARG" 2009 14.49614 -.294032 .1887648 9.420347 17.52135
    "ARG" 2010 16.03719 -.111792 .1520914  9.51424 17.52391
    "ARG" 2011 16.75695 -.072361 .1315418 9.561016 17.53544
    "ARG" 2012 14.28868 -.206967 .1057787  9.53933 17.54681
    "ARG" 2013 14.71676 -.253539 .0969167 9.551908   17.558
    "ARG" 2014 14.00132  -.11076 .0960152 9.515466 17.56899
    "ARG" 2015 11.78057 -.049351 .0831331 9.531631 17.57977
    "ARG" 2016 13.56679  .219069 .0702343 9.500036 17.59035
    "ARG" 2017 13.96932     .135 .0745675  9.51746 17.60072
    "ARG" 2018 16.32585  .028094 .0995468  9.48078 17.61088
    "ARG" 2019 14.70574 -.120678 .1253808 9.450634 17.62081
    "ARG" 2020 13.59828 -.253818 .1680119 9.336679 17.63051
    "ARG" 2021 14.93344 -.389672 .1846933 9.429019 17.63999
    "ARG" 2022 15.35095 -.282877 .2008211 9.468136 17.64924
    "ARG" 2023 14.05239        . .2497692 9.443472 17.65828
    "ARM" 2000 50.07191 -.546418 9.529371 7.130589 14.96878
    "ARM" 2001 45.71841        . 9.876949 7.233488 14.95754
    "ARM" 2002 46.15239 -.045769 11.10492 7.366482 14.94854
    "ARM" 2003 49.56837 -.197254 11.96483 7.504275 14.94177
    "ARM" 2004 44.87989 -.118263 22.01857  7.61009  14.9358
    "ARM" 2005 42.82654 -.142498  18.6764 7.746293 14.92975
    "ARM" 2006 38.88416 -.261503 18.31282 7.877115 14.92291
    "ARM" 2007 38.78569 -.381907 17.86141 8.012836 14.91559
    "ARM" 2008  40.2766 -.177953 16.32705 8.086564 14.90858
    "ARM" 2009 42.60334 -.026896 16.64916 7.941009 14.90215
    "ARM" 2010 44.89456 -.171523 18.02684 7.968862 14.89606
    "ARM" 2011 46.91238 -.115028 17.73422 8.020685 14.89016
    "ARM" 2012 48.39986 -.032387 18.03302 8.095193 14.88518
    "ARM" 2013 49.20156   .07866 19.71138 8.132143  14.8807
    "ARM" 2014 47.21849 -.255828 17.90444 8.171467 14.87674
    "ARM" 2015 41.95668 -.331129 14.13274 8.206895 14.87281
    "ARM" 2016 42.33369 -.311781 13.10746 8.213336 14.86837
    "ARM" 2017 48.98633 -.251172 13.34774 8.290523  14.8635
    "ARM" 2018 53.08021 -.170386  11.9427 8.346619  14.8581
    "ARM" 2019 54.76335 -.225959 11.21892 8.425509 14.85246
    "ARM" 2020 39.72382 -.304617 10.49706 8.356116 14.84713
    "ARM" 2021 43.76345 -.281927 11.21718 8.417726  14.8419
    "ARM" 2022 50.99284  -.31423 10.42774 8.540169 14.83813
    "ARM" 2023  58.8615        . 7.640797 8.624489 14.83723
    "ASM" 2000        .        .        .        . 10.97216
    "ASM" 2001        .        .        .        . 10.97377
    "ASM" 2002 109.7656        .        . 9.457547 10.97125
    "ASM" 2003  109.542        .        . 9.471221 10.96718
    "ASM" 2004 111.9843 -.126989        . 9.480762 10.96173
    "ASM" 2005    123.6    .2247        . 9.483149 10.95525
    "ASM" 2006 129.4118  .245478        . 9.448611 10.94794
    "ASM" 2007 120.6564  .481087        .  9.47498 10.93992
    "ASM" 2008 135.3571  .498479        . 9.456812 10.93116
    "ASM" 2009 82.81481  .497975        .  9.42369 10.92172
    "ASM" 2010 94.41536  .487728        . 9.436066 10.91234
    "ASM" 2011 98.77193  .481366        . 9.445941 10.90246
    "ASM" 2012 100.9375   .48123        . 9.413088   10.891
    "ASM" 2013 102.0376  .487087        . 9.400818 10.87795
    "ASM" 2014 108.0871  .438977        . 9.433083 10.86316
    "ASM" 2015 98.81129   .44323        . 9.480485 10.84677
    "ASM" 2016   95.231  .482979        . 9.481621  10.8287
    "ASM" 2017 102.2876  .510402        . 9.428902 10.80898
    "ASM" 2018 103.5994   .49874        . 9.476492 10.78775
    "ASM" 2019 94.89954  .490094        . 9.494643 10.76471
    "ASM" 2020 95.14563  .632899        . 9.562028  10.7405
    "ASM" 2021 92.53333  .639231        . 9.579474  10.7152
    "ASM" 2022 77.72675  .667918        . 9.613741 10.69813
    "ASM" 2023        .        .        .        . 10.68999
    "ATG" 2000        .  .618823 1.925815 9.675828 11.22598
    "ATG" 2001        .        .  2.69815 9.613944 11.24131
    "ATG" 2002        .  .568054 1.586007 9.611387 11.25409
    "ATG" 2003        .   .57673  1.72711 9.659046 11.26542
    "ATG" 2004        .   .54032 1.715255 9.704081 11.27646
    "ATG" 2005        .  .447558 2.537182 9.755124 11.28814
    "ATG" 2006        .  .407992 2.240199  9.86199 11.30091
    "ATG" 2007        .  .399155 2.040757 9.937294 11.31467
    "ATG" 2008        .  .498479 1.908087 9.922208 11.32962
    "ATG" 2009        .  .497975 2.006381 9.779502 11.34491
    "ATG" 2010        .  .487728 2.227929 9.684213 11.35855
    "ATG" 2011        .  .481366 2.286403 9.652437 11.37054
    "ATG" 2012        .   .48123 2.248899 9.674772 11.38138
    "ATG" 2013        .  .487087 2.260947 9.659404 11.39072
    "ATG" 2014 67.02947 -.070345 2.309874 9.672961 11.39904
    "ATG" 2015 59.35589  .183695 2.173138  9.67944 11.40691
    "ATG" 2016 61.99813  .218476 1.792697 9.712716 11.41381
    "ATG" 2017 63.40131    -.036 1.568756 9.730942 11.41992
    "ATG" 2018  68.1846 -.053471 1.972175 9.792614 11.42547
    "ATG" 2019 68.41653 -.054695 2.137262 9.817803 11.43081
    "ATG" 2020  52.4348 -.204487 2.567379 9.602637 11.43674
    "ATG" 2021  54.1394 -.193285 2.826701   9.6754 11.44271
    "ATG" 2022 62.94042 -.159469 1.863802 9.760486 11.44853
    "ATG" 2023        .        . 2.432176 9.792689 11.45422
    "AUS" 2000 21.54498  1.73217 .1245493 10.73332 16.76147
    "AUS" 2001 22.06638        . .1282158 10.74053  16.7743
    "AUS" 2002 20.72243   1.6592 .1176695 10.76818 16.78568
    "AUS" 2003 21.14435  1.77328 .1393025 10.78711 16.79718
    "AUS" 2004 19.84715  1.98494 .1341765  10.8178 16.80787
    "AUS" 2005 20.93637  1.74618 .1351757 10.83668 16.82005
    "AUS" 2006 21.70591   1.7079 .1355983 10.85036 16.83354
    "AUS" 2007 21.82452  1.81896 .1569403 10.86915 16.85179
    "AUS" 2008  22.6979  1.78477 .1444946 10.88435 16.87183
    "AUS" 2009 22.72988  1.70196 .1437019 10.88249 16.89244
    "AUS" 2010 20.71527  1.76339 .1622847 10.88895   16.908
    "AUS" 2011 20.40156  1.69014 .1751115 10.89886 16.92189
    "AUS" 2012 21.65763  1.61315 .1576994 10.91984 16.93935
    "AUS" 2013 21.27608  1.63285 .1560347 10.92836 16.95656
    "AUS" 2014  21.3607  1.60137 .1586314 10.93918 16.97148
    "AUS" 2015 21.53615  1.53418 .1608745 10.94657 16.98587
    "AUS" 2016 21.53242  1.53334 .1703277 10.95836 17.00149
    "AUS" 2017 20.71368  1.49827 .1508746 10.96481 17.01796
    "AUS" 2018 21.49352  1.55606 .1306489  10.9785 17.03292
    "AUS" 2019 21.63717  1.53876 .1263843  10.9853 17.04769
    "AUS" 2020 20.17567  1.57378 .0899955 10.96962 17.06002
    "AUS" 2021 17.72554    1.474 .0600643 10.98911 17.06143
    "AUS" 2022 19.70962  1.52887  .077204 11.01818 17.07416
    "AUS" 2023 21.36069        . .0960792  11.0242 17.09787
    "AUT" 2000 42.01422  1.84727  .914654 10.56728  15.8964
    "AUT" 2001 42.91911        . .8981882 10.57604 15.90022
    "AUT" 2002 41.62878  1.88023 .9260156 10.58751 15.90514
    "AUT" 2003 41.81697  1.93046 .9517333   10.592 15.91002
    "AUT" 2004 43.92513  1.84377 .8362666 10.61278 15.91622
    "AUT" 2005 45.41405  1.67953 .7319088 10.62816 15.92303
    "AUT" 2006 47.24664  1.82739 .7485344 10.65717 15.92798
    "AUT" 2007 48.17239  1.86357 .7491599 10.69053 15.93122
    "AUT" 2008 48.82482  1.77166 .7382929  10.7019 15.93435
    "AUT" 2009 41.85481  1.66274 .7720259  10.6609 15.93697
    "AUT" 2010 47.75764  1.81252 .7605602  10.6767 15.93938
    "AUT" 2011 51.15412  1.60289 .7530499 10.70214 15.94275
    "AUT" 2012  51.1785  1.56019 .7396618 10.70436 15.94731
    "AUT" 2013 50.62512  1.57191  .758153 10.69873  15.9532
    "AUT" 2014 50.11695  1.55362 .7320409  10.6975 15.96102
    "AUT" 2015 49.33825  1.45145 .7496919 10.69639 15.97223
    "AUT" 2016 48.57568  1.47535 .7294856 10.70527 15.98304
    "AUT" 2017 50.88769  1.46741 .7086532 10.72066 15.98999
    "AUT" 2018 52.46142   1.4561 .6643187 10.73975 15.99486
    "AUT" 2019 52.13173  1.49224 .6738832 10.74971  15.9993
    "AUT" 2020 48.12335  1.60626 .6957306 10.67692 16.00345
    "AUT" 2021 55.03312  1.53002 .6678599 10.71407 16.00781
    "AUT" 2022 61.60226  1.46545 .6369891 10.75145 16.01737
    "AUT" 2023 56.64198        . .6405742 10.73317 16.02734
    "AZE" 2000 38.37774 -.951395 1.083561 7.300344 15.90101
    "AZE" 2001 37.31658        . 1.824317 7.386997 15.90876
    "AZE" 2002 50.05031 -.985209 2.618901 7.469731 15.91622
    "AZE" 2003 65.54537 -.933229 2.143322 7.559357 15.92379
    "AZE" 2004 72.71811 -.933773 2.345259 7.639106 15.93255
    "AZE" 2005 52.90078 -.741809 4.705286 7.875443 15.94277
    "AZE" 2006 38.75826 -.671189 3.766165 8.160851 15.95376
    "AZE" 2007  28.5129 -.802226 3.835877 8.372656  15.9651
    "AZE" 2008 23.46676 -.785877 3.108059 8.453844 15.98609
    "AZE" 2009  23.1083 -.664515  2.83264 8.521976 16.00686
    "AZE" 2010 20.68127 -.813017 2.665498 8.559334 16.01875
    "AZE" 2011 24.08106 -.772404 2.870356 8.547303 16.03178
    end

    Best,

    Abdan


  • #2
    PSM is no problem with cross sectional data.

    You have some collinearity.

    start here and figure it out why x2 is omitted (and you'll see that inflow_q==1 is not statistcally different than inflow_q==4), though the coef is large.

    Code:
    xtile inflow_quartile = inflow, nquantiles(4)
    reghdfe y i.inflow_quartile x2 x2 x3 , absorb(country year) vce(robust)

    Comment


    • #3
      Code:
      g inflow_quartile_treatment = inflow_quartile==4
      replace inflow_quartile_treatment = . if !inlist(inflow_quartile,1,4)
      It won't estimate by teffects using only quar 1 and 4.

      Comment


      • #4
        Hi George,

        Thank you for your reply. Sorry that that there was problem my sample data. Attached is the full data. Here is the result of running the teffects psmatch command on the data. I am not sure whether this is the correct way to handle PSM in panel data setting. Thanks for your help!

        Code:
        teffects psmatch (y) (inflow_quartile_treatment x1 x2 x3 i.year)
        
        Treatment-effects estimation                   Number of obs      =      1,494
        Estimator      : propensity-score matching     Matches: requested =          1
        Outcome model  : matching                                     min =          1
        Treatment model: logit                                        max =          1
        -------------------------------------------------------------------------------------------
                                  |              AI robust
                                y | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
        --------------------------+----------------------------------------------------------------
        ATE                       |
        inflow_quartile_treatment |
                        (1 vs 0)  |   11.84497   1.292496     9.16   0.000     9.311721    14.37821
        -------------------------------------------------------------------------------------------
        Best,

        Abdan
        Attached Files

        Comment


        • #5
          Code:
          kmatch ps inflow_quartile_treatment x1 x2 x3 (y), ematch(year) nn(1) 
          kmatch ps inflow_quartile_treatment x1 x2 x3 (y = i.cid), ematch(year) nn(1) 
          
          kmatch ps inflow_quartile_treatment x1 x2 x3 (y), ematch(year) nn(2) 
          kmatch ps inflow_quartile_treatment x1 x2 x3 (y = i.cid), ematch(year) nn(2)

          Comment


          • #6
            Thank you, George. So the adjustment needed for panel date is (simply) to use ematch(year), which requires the matching is done within the same year, right?

            I get a very different result whether to use y= i.cid or not. Not using i.cid works better for my result. Do you know whether using i.cid is a must for panel data? I think the help file says using i.cid (adjustment variable) means doing bias-correction, which seems to be a must? Is that so? Thank you!


            Without i.cid:
            Code:
             kmatch ps inflow_quartile_treatment x1 x2 x3 (y), ematch(year) nn(2) att
            
            Propensity-score nearest-neighbor matching               Number of obs = 1,494
                                                            Neighbors:    min =          2
            Treatment   : inflow_quartile_treatment = 1                   max =          2
            Covariates  : x1 x2 x3
            Exact       : year
            PS model    : logit (pr)
            
            Matching statistics
            ------------------------------------------------------------------------------
                       |             Matched             |            Controls           
                       |       Yes         No      Total |      Used     Unused      Total
            -----------+---------------------------------+--------------------------------
               Treated |       863          0        863 |       311        320        631
            ------------------------------------------------------------------------------
            
            Treatment-effects estimation
            ------------------------------------------------------------------------------
                       y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                     ATT |   9.968398   1.209403     8.24   0.000     7.596088    12.34071
            ------------------------------------------------------------------------------
            With i.cid:
            Code:
            kmatch ps inflow_quartile_treatment x1 x2 x3 (y = i.cid), ematch(year) nn(2) att
            
            Propensity-score nearest-neighbor matching               Number of obs = 1,494
                                                            Neighbors:    min =          2
            Treatment   : inflow_quartile_treatment = 1                   max =          2
            Covariates  : x1 x2 x3
            Exact       : year
            PS model    : logit (pr)
            RA equations: y = i.cid _cons
            
            Matching statistics
            ------------------------------------------------------------------------------
                       |             Matched             |            Controls           
                       |       Yes         No      Total |      Used     Unused      Total
            -----------+---------------------------------+--------------------------------
               Treated |       863          0        863 |       311        320        631
            ------------------------------------------------------------------------------
            
            Treatment-effects estimation
            ------------------------------------------------------------------------------
                       y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                     ATT |   2.105848   4.300006     0.49   0.624    -6.328846    10.54054
            ------------------------------------------------------------------------------


            Thank you!

            Comment


            • #7
              I would. If the means of y are very different across countries, then you'll get spurious results.

              It would be like matching people in Alabama and California on age, weight, education, and then comparing their incomes, without accounting for the fact incomes are on average much larger in California.

              Comment

              Working...
              X