Q1. Say, we are exploring the association between diet at baseline (no/yes) and systolic blood pressure over 5 follow-ups for each subject. For this repeated measure dataset, which of the following code can be used to fit the mixed effects model with random intercept but fixed slope?. Note: `diet` is the exposure avriable, `systolic` is the systolic blood pressure variable, `subject` is the unique identifier for the subjects, and `visit` is the follow-up visits.
- A. fit <- glm(systolic ~ diet, data = longdata, family = gaussian)
- B. fit <- lm(systolic ~ diet + visit, data = longdata)
- C. fit <- lmer(systolic ~ diet + visit + (1 | subject), data = longdata)
- D. fit <- glmer(systolic ~ diet + visit + (visit | subject), data = longdata), data = longdata)