Announcement

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

  • k by k Cochran-Mantel-Haenszel test

    Hi Lister,

    I would like to explore the association between an outcome (rating; measured on 4-point Likert scale) and predictor (inpatient vs. outpatients) while also taking into account that the data are stratified by hospital site. I considered using the -emh- command but I am not sure it is the right command as I get a blank output...

    Code:
    emh rating patient_type, s(hospital)
    Can you advice how I can achieve this?

    Thanks,
    Laura

  • #2
    Originally posted by Laura Myles View Post
    I considered using the -emh- command but I am not sure it is the right command as I get a blank output...
    Not sure what you got wrong, but it works for me. See below. (Begin at the "Begin here" comment; the code above just creates an artificial illustrative dataset mimicking what you describe for yours.)

    .
    . version 18.0

    .
    . clear *

    .
    . // seedem
    . set seed 1031945584

    .
    . quietly set obs 50

    . generate byte hospital = mod(_n, 5)

    . bysort hospital: generate byte patient_type = mod(_n, 2)

    . generate byte rating = runiformint(1, 4)

    .
    . *
    . * Begin here
    . *
    . emh rating patient_type, s(hospital)

    Extended Mantel-Haenszel (Cochran-Mantel-Haenszel) Stratified Test of Association

    Correlation Statistic:
    Q (1) = 0.0186, P = 0.8916
    Transformation: Table Scores (Untransformed Data)


    .
    . emh rating patient_type, strata(hospital) anova transformation(modridit)

    Extended Mantel-Haenszel (Cochran-Mantel-Haenszel) Stratified Test of Association

    ANOVA (Row Mean Scores) Statistic:
    Q (1) = 0.0607, P = 0.8053
    Transformation: Standardized Midranks (Modified Ridits)


    .
    . exit

    end of do-file


    .


    By the way, I'm guessing that you're actually looking to conduct van Elteren's test. For that you'll want to use the anova transformation(modridit) options instead of the defaults. I've illustrated it above also.

    Comment


    • #3
      Thanks Joseph Coveney , I should have said that the data are from a cluster RCT so whether individuals are treated as in- or out-patient depends on which hospital they attend. That seems to be the cause of the error - so I am now questioning the need to account for the clustered nature of the data in this way. I am considering using ologit with vce(cluster ...) so that I can test for the proportional odds assumption.

      Comment


      • #4
        Originally posted by Laura Myles View Post
        . . . the data are from a cluster RCT . . . I am considering using ologit with vce(cluster ...) so that I can test for the proportional odds assumption.
        Consider also meologit.

        NHST of the proportional odds assumption seems over emphasized in that if you fail to reject the null hypothesis the only conclusion warranted is that your sample size is just too small.

        Comment

        Working...
        X