Announcement

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

  • repeated measures ANOVA error

    Dear members of the forum,
    I would appreciate your help.
    I have a dataset with 300 patients who underwent surgery for weight loss. The weight for the patients was measured before and after surgery.
    he study ran for 3 years. Patients that had surgery in 2018 had a 3 year follow-up. Patients who had surgery last year were followed up for a couple of months only.
    Long dataset looks like this.

    patient visit w_
    AS 0 241
    AS 1 237.6
    AS 2 230.4
    AS 3 231.6
    AS 4 233.2
    AS 5 230.6
    AS 6 229.9
    BD 0 233
    BD 1 228
    BD 2 220
    BD 3 209
    BD 4 .
    BD 5 .
    BD 6 .

    command
    anova w_ patient visit, repeated (visit)

    error message
    no observations
    r(2000);

    Is this because of multiple missing observations as not all patients had the same time follow up?
    Would you please help me to identify the best test to evaluate the difference in weight loss? I would like to determine the effect of age, initial weight and other variables on the overall weight loss.

    THANK YOU!

    Aitor

  • #2
    Originally posted by Aitor Macias View Post
    Is this because of multiple missing observations as not all patients had the same time follow up?
    No, I believe that it's because anova doesn't accept string variables. You need to convert the patient variable to numeric datatype beforehand.

    Try something like the following.
    Code:
    encode patient, generate(pid) label(Patients)
    anova w_ pid visit, repeated (visit)
    and so on for age, initial weight and other variables.

    Comment


    • #3
      Thank you so much Joseph!
      That was the problem!!

      Aitor

      Comment

      Working...
      X