Announcement

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

  • Pairwise comparison by time point after repeated measure

    Hi,
    I'm eying trouble trying to figure out a way to do pairwise comparisons by time point after repeated measure Anova. I have 2 time points (time within) and 4 different groups each time point (between). I don't want to have all the pairwise comparison using pwmean, but instead multiple comparisons for each time using just one command.
    Thank you,
    Giuseppe

  • #2
    Welcome to the Stata Forum/Statalist.

    The best way to entail insightful replies, as recommended in the FAQ, is sharing data (full, abridged or mock).

    You may do it by using Code delimiters or installing the SSC dataex.
    Best regards,

    Marcos

    Comment


    • #3
      Hi Marcos,
      Thank you for your time. These are the data. I was using wsanova command to get a repeated measure anova result (3-way).
      Code:
      wsanova DepVar Time if Subjects, id(Subjects) bet (VAR1 VAR2 VAR1*VAR2)
      I like to use wsanova because the code it's really simple. However, I get the same results with the following code:
      Code:
      anova DepVar VAR1##VAR2 / Subjects|VAR1#VAR2 Time##VAR1##VAR2, repeated(Time) bseunit(Subjects)

      Code:
       
      Subjects VAR1 VAR2 Time DepVar
      1 1 1 1 39.7
      5 1 1 1 50.3
      8 1 1 1 25.3
      12 1 1 1 41
      18 1 1 1 40.3
      19 1 1 1 57.3
      22 1 1 1 39
      31 1 1 1 55.3
      37 1 1 1 72.3
      41 1 1 1 40.3
      46 1 1 1 43.7
      4 1 2 1 49.3
      9 1 2 1 46.7
      13 1 2 1 43.3
      16 1 2 1 18.3
      23 1 2 1 38
      26 1 2 1 56.3
      27 1 2 1 29.7
      29 1 2 1 45
      33 1 2 1 59.7
      48 1 2 1 43.7
      3 2 1 1 40
      10 2 1 1 16
      14 2 1 1 64.7
      17 2 1 1 42
      25 2 1 1 49
      28 2 1 1 39.3
      2 2 2 1 32.7
      11 2 2 1 73
      15 2 2 1 49
      20 2 2 1 44.3
      30 2 2 1 35
      32 2 2 1 49
      34 2 2 1 57.3
      39 2 2 1 48.7
      43 2 2 1 53.3
      1 1 1 2 51
      5 1 1 2 36
      8 1 1 2 51
      12 1 1 2 164
      18 1 1 2 125
      19 1 1 2 119
      22 1 1 2 98
      31 1 1 2 177
      37 1 1 2 120
      41 1 1 2 157
      46 1 1 2 130
      4 1 2 2 41
      9 1 2 2 73
      13 1 2 2 60
      16 1 2 2 12
      23 1 2 2 54
      26 1 2 2 125
      27 1 2 2 58
      29 1 2 2 120
      33 1 2 2 98
      48 1 2 2 33
      3 2 1 2 108
      10 2 1 2 20
      14 2 1 2 57
      17 2 1 2 59
      25 2 1 2 79
      28 2 1 2 91
      2 2 2 2 155
      11 2 2 2 70
      15 2 2 2 96
      20 2 2 2 127
      30 2 2 2 84
      32 2 2 2 178
      34 2 2 2 139
      39 2 2 2 250
      43 2 2 2 109
      however, if i ran
      Code:
      pwmean DepVar, over(Time VAR1 VAR2) mcompare(snk) pveffects
      I get all the pairwise comparison within time point (1 and 2) and between time point (all the variable of time point 1 Vs. all the variables time point 2).
      I was looking for a way to get multiple comparisons af all my dataset only within each time point.
      Thank you
      Giuseppe

      Comment


      • #4
        I'm still struggling with it!

        Comment


        • #5
          Here, do this:
          Code:
          mixed DepVar i.(VAR1##VAR2##Time) || Subjects: , reml dfmethod(kroger) nolrtest nolog
          contrast r.VAR1#VAR2@Time, mcompare(bonferroni) small noeffects

          Comment

          Working...
          X