Announcement

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

  • teffects psmatch - how to get the selected sample and apply common tests

    Dear Forum Members,

    After applying the command - teffects psmatch -, I wish to get the selected sample, then apply tests for the "treatment" group (such as ttest, chi2, ranksum, etc.) for the sake of demonstrating the control group was appropriately matched with the treatment group, i.e., in short, to get a similar mean (for continuous variables), or proportion (for categorial variables) and, as a consequence, non-significant p-values.

    For example, considering the code below:

    Code:
    webuse cattaneo2
    teffects psmatch (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, logit), nneighbor(2) gen(pho) osample(mymatch)
    predict myprob, te
    I'd like to:

    a) tabulate and get the number of observations selected after the matching, by mbsmoke.
    b) perform ttest with, say, mage and mbsmoke only for the matched sample
    c) perform a chi-squared test for fbay with mbsmoke only for the the matched sample.

    As far as I tried, I didn't find information on this. It seems the user-written psmatch2 can handle these issues. I wonder how this can be done under - teffects psmatch - or, if not, under psmatch2.

    Many thanks in forward.
    Best regards,

    Marcos

  • #2
    This is just a gentle reminder, with hope some forum members would have experienced a similar situation and know how to tackle it.
    Best regards,

    Marcos

    Comment


    • #3
      See the following under "Regression on the "Matched Sample" ".

      https://www.ssc.wisc.edu/sscc/pubs/stata_psmatch.htm

      Comment


      • #4
        Thank you for sharing this link. It is really insightful text. Actually, I came across it some time ago. Since it was lastly revised in 2015, I thought I could find something new concerning - teffects - command for a matched sample. This was also a great opportunity to read carefully the text. That made me figure out that not only it is rather cumbersome to get the matching from - teffects - but, what is more, the authors didn't recommend this method at all. Being this so, and after re-reading the text, I think I should not pursue this goal. Thank you again for letting me know.
        Best regards,

        Marcos

        Comment


        • #5
          @Marcos Almeida Hi Marcos, do you know how to solve your questions through -psmatch2-? My trial codes have trouble in generating similar means between the treatment group and the control group, so I will be really appreciated if you enlighten me on this matter. Many thanks for your time in advance!

          Comment


          • #6
            Jae Li : Well, at this very momment, I still think that same as underlined in #4, i.e., I tend to use - teffects - for propensity score (usually, I use inverse probability weighting) and avoid other packages which produce a matched sort of spreadsheet.
            Best regards,

            Marcos

            Comment


            • #7
              @Marcos Almeida Hi Marcos, thank you for your reply! Would you mind take a look at my recent post below? I will be really grateful if you can advise me a little bit. Many thanks!

              https://www.statalist.org/forums/for...on#post1551564


              Comment


              • #8
                @Marcos Almeida Hi Marcos, have you figured out how to get tests for the "treatment group" (e.g. ttest, chi2, etc.) after applying the command - teffects psmatch - ? I am running the same issue. It would be great if you could answer my question. Thank you in advance.

                Comment


                • #9
                  Marcos Almeida, I think one way to do this would be to separately use teffects for getting treatment effect, and use psmatch2 (from ssc) for balance check. For the latter, I think something like this will get you what you need:
                  Code:
                  //ssc install psmatch2
                  webuse cattaneo2
                  logit mbsmoke mmarried c.mage##c.mage fbaby medu
                  predict pscore
                  psmatch2 mbsmoke, pscore(pscore) outcome(bweight)
                  pstest mmarried c.mage##c.mage fbaby medu, both

                  Comment

                  Working...
                  X