Announcement

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

  • one-way repeated measures ANOVA in groups

    Hello everyone!

    I need some assistance with one-way repeated measures ANOVA. I am using Stata 13 in Windows 10.
    I want to use a one-way repeated measures ANOVA to understand whether there is a difference in body mass index (BMI) in three different genotypes of a certain transcription factor (AP2bgeno). I have measured BMI in three diferent time points (subjects 15 years, 18 years and 25 years old). How do I build up the command?

    I am quite new to Stata. I tried this:
    Code:
    anova BMI AP2bgeno / ID|AP2bgeno time, repeated(time)
    The command Works, but I am not certain if I am getting what I intended?
    Code:
     anova BMI AP2bgeno / ID|AP2bgeno time, repeated(time)
    
                               Number of obs =    2630     R-squared     =  0.9723
                               Root MSE      = 2.53114     Adj R-squared =  0.9529
    
                      Source |  Partial SS    df       MS           F     Prob > F
                 ------------+----------------------------------------------------
                       Model |  347928.226  1082  321.560283      50.19     0.0000
                             |
                    AP2bgeno |  84.8214041     2  42.4107021       3.23     0.0400
                 ID|AP2bgeno |  14161.9889  1078   13.137281   
                 ------------+----------------------------------------------------
                        time |  299146.515     2  149573.258   23346.42     0.0000
                             |
                    Residual |  9911.14691  1547  6.40668837   
                 ------------+----------------------------------------------------
                       Total |  357839.373  2629  136.112352   
    
    
    Between-subjects error term:  ID|AP2bgeno
                         Levels:  1081      (1078 df)
         Lowest b.s.e. variable:  ID
         Covariance pooled over:  AP2bgeno  (for repeated variable)
    
    Repeated variable: time
                                              Huynh-Feldt epsilon        =  0.8147
                                              Greenhouse-Geisser epsilon =  0.8121
                                              Box's conservative epsilon =  0.5000
    
                                                ------------ Prob > F ------------
                      Source |     df      F    Regular    H-F      G-G      Box
                 ------------+----------------------------------------------------
                        time |      2 23346.42   0.0000   0.0000   0.0000   0.0000
                    Residual |   1547
                 -----------------------------------------------------------------
    Thank You in advance!

  • #2
    Welcome to the Stata Forum / Statalist,

    You unfortunately didn't give much information about the data display.

    Therefore, I recommend you take a look at this text.
    Best regards,

    Marcos

    Comment


    • #3
      Do you have data for the same subjects at 15, 18 and 25 years of age? If so, then I think your model is the same as the one shown here: Here's the code for that example:

      Code:
      anova lhist group / dog|group time time#group if dog!=6, repeated(time)
      Replace lhist with BMI, replace group with AP2bgeno, replace dog with ID, and remove if dog!=6.

      Code:
      anova BMI AP2bgeno / ID|AP2bgeno time time#AP2bgeno, repeated(time)
      HTH.

      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Thank You very much Bruce!

        Yes, I have longitudinal data from a cohort study, so I have measured the same subjects.

        I was actually reading the same text that You both referred to, but could not figure it out.

        I am very grateful for the assistance!


        Best regards,
        Urmeli

        Comment


        • #5
          The link Bruce and I shared goes on the very same verge, as you remarked.

          That said, I wonder whether a mixed model wouldn't "fit" better to your needs.

          For this, you may type in the command window:

          Code:
          . help mixed
          I believe a mixed model approach under - mixed - has more "plasticity", so to speak, if compared to a mixed ANOVA, let alone the issue of the more restrictive assumptions concerning ANOVA
          Best regards,

          Marcos

          Comment

          Working...
          X