Announcement

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

  • OGTT - repeated measures ANOVA

    Hi!

    I need help to the analysis of an oral glucose tolerance test (OGTT). I have three fasting groups, seven time points for blood drawing and an insulin score for each time point:

    fast - time - score
    18 - 1 - 0.495
    18 - 2 - 0.598
    18 - 3 - 4.194
    18 - 4 - 2.054
    18 - 5 - 0.944
    18 - 6 - 0.742
    18 - 7 - 0.661
    12 - 1 - 0.653
    12 - 2 - 0.626
    12 - 3 - 3.849
    12 - 4 - 2.069
    12 - 5 - 1.059
    12 - 6 - 0.826
    12 - 7 - 0.721
    6 - 1 - 0.608
    6 - 2 - 0.627
    6 - 3 - 2.738
    6 - 4 - 1.498
    6 - 5 - 0.912
    6 - 6 - 0.762
    6 - 7 - 0.748

    I want to test if there are any difference at each time point between fasting groups. I think I need to use a repeated measures ANOVA followed by a mixed-effect linear regression. And a two-sided paired t test for the comparisons of mean insulin concentrations at individual time points.

    Can any of you maybe help me setting up the commands for this analysis? (i'm new in both statistics and STATA, so it is a bit difficult for me to do by my self).



    Last edited by Majbritt Lund; 15 Mar 2018, 03:56.

  • #2
    Welcome to the Stata Forum / Statalist,

    You have 7 repeated measures, but also 3 groups. This implies that a "pure blood" repeated-measure ANOVA won't do fine. You'll probably need a mixed ANOVA. That said, with so many repeated measures, sphericity is an issue to envisage. You may "correct" for this, and the correction (in fact, 3 strategies) is already provided in the output. A mixed model seems to be a great approach for this. Since you said you're new to Stata, you may wish to type - help anova - and - help mixed - in the command window and see several examples. You also considered yourself "new to statistics". Maybe I'm wrong, but I fear that dealing with a mixed model (as well as a mixed ANOVA to some extent) may be quite overwhelming whithout having learned first things first. But "first things" I meant a sound grasp of regression analysis. Hopefully that helps.
    Last edited by Marcos Almeida; 15 Mar 2018, 05:17.
    Best regards,

    Marcos

    Comment


    • #3
      Originally posted by Majbritt Lund View Post
      I want to test if there are any difference at each time point between fasting groups.
      Assuming this isn't a crossover design, you won't need any ANOVA or mixed-effect linear regression. You'd just iterate through the postloading times and do pairwise (unpaired) t-tests between the fasting-duration groups. Take a look at the code below (you can start at the "Begin here" comment) for how to go about doing that. Running the code will give you an idea of what the output would look like when you use it on your dataset.
      Code:
      version 15.1
      
      clear *
      set seed `=strreverse("1434516")'
      
      input byte (fast time) float score
      18  1  0.495
      18  2  0.598
      18  3  4.194
      18  4  2.054
      18  5  0.944
      18  6  0.742
      18  7  0.661
      12  1  0.653
      12  2  0.626
      12  3  3.849
      12  4  2.069
      12  5  1.059
      12  6  0.826
      12  7  0.721
      6  1  0.608
      6  2  0.627
      6  3  2.738
      6  4  1.498
      6  5  0.912
      6  6  0.762
      6  7  0.748
      end
      
      quietly expand 7
      quietly replace score = score + rnormal(0, 0.15 * score)
      
      *
      * Begin here
      *
      table fast time, contents(mean score sd score n score) format(%04.2f)
      
      quietly levelsof time, local(times)
      foreach time of local times {
          quietly levelsof fast if time == `time', local(fasts)
          local fast_levels : list clean fasts
          foreach fast of local fasts {
              local pair : list fast_levels - fast
              local pair : subinstr local pair " " "- and "
              display in smcl as text _newline(1) ///
                  "Comparing " as result "`pair'-hour" as text " fasting times at " ///
                  as result `time' as text " hours after glucose load"
              quietly ttest score if time == `time' & fast != `fast', by(fast)
              display in smcl as text "P = " as result %04.3f min(r(p) * 21, 1)
          }
      }
      
      exit

      Comment

      Working...
      X