Announcement

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

  • 4:1 Matched Analysis using McNemar's Test

    Hi Statalist!
    I'm doing a matched analysis where tests of association make more sense than modeling, and I'd like to use McNemar's Test. We matched on sex and zip code, but we matched 4:1. Can we still use McNemar's test? Or do I have to use M-H methods? If so, why?

    Thanks!

  • #2
    My take is that, by definition, McNemar's test denotes a test with 1:1 matching, so that you are testing whether data could arise from a population in which the non-tied pairs (+-, -+) are split evenly. In your situation, you have many different kinds of matched sets in which the Tx and Ctl subjects are not completely tied, i.e.: Tx+ with 0 Ctl+ subjects; Tx+ with 1 Ctl+ subject; ... with 0 Ctl+ subjects, for a total of 8 different kinds of non-tied sets (Tx+, Tx-). The logical extension of McNemar's test here would involve an hypothesis about the distribution of all these different kinds of matched sets. A test on that is certainly possible, but I presume that's not of interest.

    Is there something unattractive about using the Mantel-Haenszel test that the common odds ratio = 1, i.e.,
    -cc case control, by(MatchedSetID) exact-

    Regards, Mike

    Comment


    • #3
      Hi Mike. Thank you so much for answering my question! I wasn't sure if there was some variation, but you're right, by definition it is a ratio of discordant pairs, so how can you define a discordant pair with multiple controls!

      So, once I realized that I can only do a matched OR and CMH test--I looked at the command (mcc), and there doesn't seem to be a spot to type in 4:1 match. Can you direct me to it? Thanks!

      AE
      Last edited by aemery; 01 Aug 2014, 10:53.

      Comment


      • #4
        I don't think you can do this with -mcc-. Have you looked at -clogit-? That allows matched tuples of any size, and even of non-uniform sizes.
        Last edited by Clyde Schechter; 01 Aug 2014, 10:57. Reason: Correct typo.

        Comment


        • #5
          Hi Clyde-
          I was thinking that I should do a mantel haenszel odds ratio rather than conditional logit. Is the right command MHODDS? If so, why doesn't that seem to allow me to do matched analysis? Is the only tool that allows for matched analysis clogit? I'm totally confused. Thanks for your help.

          Comment


          • #6
            -mhodds- is not for use with matched data. It won't help you. A far as I know, the only built-in commands for matched odds ratios are -mcc- and -mcci- which only accept matched pairs. I'm not aware of anything on SSC that will help you either. I think -clogit- is your only choice (or its equivalent, -xtlogit, fe-).

            In your original post, you said you were looking for a McNemar test. Mathematically, -clogit- provides a generalization of McNemar. That is, if you had matched pair data, and you did both -clogit- and a McNemar test (with -mcc-) you would get the same odds ratio (up to perhaps some minor differences in far-off decimal places due to different numerical algorithms). So, I don't see why you are reluctant to go with -clogit-.

            [Caveat: I have done maybe 3 matched-data analyses in my life, not counting student exercises, so there may be resources I'm not aware of.]

            Comment


            • #7
              Clyde--that was super helpful. Thank you.

              Comment


              • #8
                Just for fun: You can get the same results here for the McNemar test or its generalization with -mhodds-, -cc-, -clogit-, or -mcc-. (I recall learning somewhere that the matched analysis here is equivalent to the Mantel-Haenszel test with stratification by the matched set id). -mcc- only allows 1:1 matching, to my knowledge. I suspect that -clogit- is less tolerant of sparse data, as often occurs in matched analyses like this. Here's an example:

                Code:
                webuse lowbirth2, clear
                keep low ht pairid
                mhodds low ht, by(pairid)
                cc low ht, by(pairid)
                clogit low ht , group(pairid)
                //
                sort pairid low // controls are first within pair
                by pairid: gen ctl_exposed =   (ht[1] == 1) if _n ==1  
                by pairid: gen case_exposed =  (ht[2] == 1) if _n ==1
                mcc ctl_exposed case_exposed
                //  Fake expansion to 4 controls
                expand 4 if (low == 0)
                mhodds low ht, by(pairid)
                cc low ht, by(pairid)
                clogit low ht , group(pairid)  // slightly different p-value
                Regards, Mike

                Comment

                Working...
                X