Announcement

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

  • ANOVA repeated measures

    Dear all,

    I am new to the forum and I have tried to find another post about ANOVA repeated measures but haven't been able to find one. So here is my question and I'd be very thankful if there is someone who can help me out with this one!

    I am trying to execute a OneWay ANOVA with repeated measures, on a dataset that I obtained after measuring two locations of a prosthesis (repeated measures because I measured Resistance on Location 1 and then Location 2) and I am trying to compare Fractura Resistance (Dependent Variable -y: called Resistance) in three different groups (0,1,2). This is my dataset:

    list, sepby (GROUP)

    +--------------------------------------+
    | GROUP Location Resist~e
    |--------------------------------------|
    1. | 0 1 1490 0 |
    2. | 0 2 1890 0 |
    3. | 0 1 1778 0 |
    4. | 0 2 2260 0 |
    5. | 0 1 1650 0 |
    6. | 0 2 2140 0 |
    7. | 0 1 1660 0 |
    8. | 0 2 2270 0 |
    9. | 0 1 1440 0 |
    10. | 0 2 2180 0 |
    |--------------------------------------|
    11. | 1 1 1470 0 |
    12. | 1 2 1640 0 |
    13. | 1 1 1630 0 |
    14. | 1 2 1290 0 |
    15. | 1 1 1564 0 |
    16. | 1 2 1390 0 |
    17. | 1 1 1530 0 |
    18. | 1 2 1510 0 |
    19. | 1 1 1540 0 |
    20. | 1 2 1480 0 |
    |--------------------------------------|
    21. | 2 1 674 0 |
    22. | 2 2 801 0 |
    23. | 2 1 860 0 |
    24. | 2 2 969 0 |
    25. | 2 1 893 0 |
    26. | 2 2 1040 0 |
    27. | 2 1 840 0 |
    28. | 2 2 805 0 |
    29. | 2 1 730 0 |
    30. | 2 2 997 0 |
    +--------------------------------------+


    But when I execute the ANOVA command, the error message pops up:

    anova Resistance GROUP Location, repeated(Location)
    could not determine between-subject basic unit; use bseunit() option
    r(422);


    Can anyone, please, let me know what am I doing wrong? And also, what kind of post-hoc estimation can I use to find differences between the groups? Kind regards.
    Last edited by Evelina Haroyan; 25 Mar 2022, 05:06.

  • #2
    Evelina:
    welcome to this forum.
    One of the regular listers who is expert in this stuff is Joseph Coveney : search for his posts on this topic on the General forum.
    See also (if you didn't do it yet) examples included in the -anova- entry, Stata .pdf manual.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Originally posted by Evelina Haroyan View Post
      . . . what am I doing wrong?
      Your description of the study seems to be incomplete. Aren't there individual members of each group?

      Just a guess, but are there five members of each group, each with a single prosthesis upon which you've made two measurements of resistance-to-fracture, one at each of two locations on the prosthesis? If that's the case, then you're missing a member-identifying variable in your dataset listing.

      Speaking of which, the listing that you show doesn't seem feasible: the listing's header shows only three variables (GROUP Location Resist~e), but each line below it shows four variables' data (0 1 1490 0).

      Anyway, if you do have a member-identifying variable in your dataset—say, pid for Patient ID—then you could fit a repeated-measures ANOVA model to the data with something like the following.
      Code:
      anova Resistance GROUP/pid|GROUP Location GROUP#Location
      Note that you would not need the repeated() option in that case inasmuch as you have only two observations for each patient.

      And also, what kind of post-hoc estimation can I use to find differences between the groups?
      You can use the postestimation command contrast for joint and pairwise NHST for main effects (group, location) and simple effects (interaction of group and location). You can also use margins followed by marginsplot to create profile plots.
      Code:
      help contrast
      help marginsplot
      for more details about their use.

      Comment


      • #4
        Thank you to both of you! you were so helpful.

        Yes, I have 5 members of each group, I have three groups and two repeated measurements. I thought my member identifying variable would be (0,1,2) as the code for the group, but I am going to try as you suggested.

        Comment

        Working...
        X