Announcement

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

  • Help with mixed model specification

    Dear all,
    I have a dataset with repeated measures of a continuous variable in a group of patients. Some of the measurements were taken with the patient fasting while others after meals. My first aim would be to assess whether a given treatment differ over time, so for this I would include time x treatment in the model. But suppose I want to assess whether treatment differs over fasting/non-fasting status, should I collapse the measurements so that each patient has two records (fasting and non-fasting) with the averages of the dependent variable, or should I just leave the dataset as it is and include fasting status x treatment in the model?

    Thanks,
    Manuel

  • #2
    Given that you're asking these questions now, after the dataset is in hand, I'm guessing that your study design won't permit you to answer them unambiguously. Cross-over designs are tricky, and these questions should have been posed at the planning stage so that they could be addressed with the least amount of confounding.

    But, to plow ahead, sure, assuming that you have observations under the combinations of factors, you could try something like
    Code:
    mixed outcome i.treatment##i.time i.treatment##i.fasting || patient:

    Comment

    Working...
    X