Announcement

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

  • ANOVA with Holm Correction

    Hi all,

    I’ve been asked to run an ANOVA with a Holm correction. I need to compare Stigma (continuous outcome) across five different survey versions (categorical independent variable).

    I understand that in this case, I can employ the -oneway- command:
    oneway Stigma Survey
    And then use an option like -bonferroni- to do a correction.
    But it seems like in Stata, in order to get the Holm correction, I need to employ the -anova- command:
    anova Stigma Survey
    And then I need to use the -test- command with the -mtest(holm)- option. Here is where I get a bit confused. It seems like I need to make a matrix to refer to when I use -test-. I just don’t understand how to make this matrix. I would like to compare Stigma across the five survey versions. How can I do this with a Holm correction?

  • #2
    Originally posted by Emily Janio View Post
    I just don’t understand how to make this matrix. I would like to compare Stigma across the five survey versions. How can I do this with a Holm correction?
    You can do the following in order to see how to construct the contrast matrix.
    Code:
    anova Stigma Survey
    
    testparm i.Survey // Optional:  in order to see which individual tests make up the omnibus test
    test , showorder // Optional:  in order to see the design matrix
    matrix input T = (0 1 0 0 0 0 \ 0 0 1 0 0 0 \ 0 0 0 1 0 0 \ 0 0 0 0 1 0)
    test , test(T) mtest(noadjust) // Optional:  in order to confirm that your contrast matrix is what you want
    
    test , test(T) mtest(holm) // <- This
    
    // An alternative syntax that doesn't require the explicit matrix (it uses the general syntax for -test-):
    test 2.rep78 3.rep78 4.rep78 5.rep78, mtest(holm)

    Comment


    • #3
      I wrote
      Code:
      test 2.rep78 3.rep78 4.rep78 5.rep78, mtest(holm)
      Make that
      Code:
      test 2.Survey 3.Survey 4.Survey 5.Survey, mtest(holm)
      (or however your category numbering is) for your dataset.

      I had confirmed that alternative syntax using the auto dataset that ships with Stata. And unintentionally neglected the mutatis mutandis when copying-and-pasting the command line into the post.

      Comment

      Working...
      X