0
$\begingroup$

I am working on a project which we have two groups of people; normal vs obese. I have a data set like the following sample:

Subject  group  time  Cholesterol
1        normal  1     12
1        normal  2     14
1        normal  3     15
2        normal  1     16
2        normal  2     18
2        normal  3     19
3        obese   1     15
3        obese   2     19
3        obese   3     19

I think the model is like the mixed model. But I was wondering which variable is the fixed effect and which one random effect? I would like

  1. To find any difference between normal and obese at each time point.
  2. To comapre Cholesterol at each time point with Time=$1$ inside of each group to see whether there is a difference or not.

Any advice would be highly appreciated. I want to use R, I am not sure whether this function is a right one for this analysis:

lm <- lme(Cholesterol~time*group, (1|Subject), data=Data)

Is it the right function to use? Should I include time*group in the model or just time+group would be enough? Also how I can compare each time with the baseline within each group?

$\endgroup$
0
$\begingroup$

"Weight status" is fixed. Subject is random.

One way of thinking about this is that fixed effects are those that would be the same if you re-ran the study. So, if you were to do this work again, you would still have to look at normal vs. obese. But you probably would not pick the same people again. However, there are other ways of looking at it (see link, below).

Lots of people find this fixed-random distinction kind of confusing. Andrew Gelman doesn't use the terms, preferring "multilevel model". I agree with him.

$\endgroup$
  • $\begingroup$ thanks so much, You mean the subject is a random effect and group is the fixed effect? $\endgroup$ – shad Nov 5 '17 at 16:20
  • $\begingroup$ Yes. That's right. $\endgroup$ – Peter Flom - Reinstate Monica Nov 5 '17 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.