Random effects, fixed effects, or perhaps nested fixed effects? Simple question (I hope).
I have the following experimental design:
Two groups: A, B (let's say they represent the two sexes), where I randomly sampled 4 subjects from each group, and measured blood pressure of each subject 3 times (let's say in 3 random time points during the day)
Here's an R example of my data:
set.seed(1)
my.df <- data.frame(group = as.factor(c(rep("A",12),rep("B",12))),
                    subject = c(sapply(c("A","B"), function(x) c(sapply(1:4, function(y) rep(paste(x,y,sep="."),3))))),
                    measurement = c(c(sapply(rnorm(4,0,2), function(x) rnorm(3,x,1))),c(sapply(rnorm(4,0.2,1), function(x) rnorm(3,x,1)))))

What I want to test is whether the blood pressure is significantly different between the two groups, but I want to account for the random effects the subjects may have.
As far as I understand, if I had many more measurements for each subject the appropriate model would be a mixed effects model where the fixed effect is the group and the random effect is subject. For example, using the lme4 package this would be:
fit <- lmer(measurement ~ group + (1|subject), data = my.df)

But only having 3 measurements for each subject doesn't allow a powerful estimation of the random effect. So my question is what is the appropriate alternative?


*

*Ignore subject and therefore use a fixed effects model.

*Perhaps use subject as a nested fixed effect, if such a thing exists?

*Any other alternatives


Thanks
 A: The things you listed are possible but do not seem better than the model you initially proposed.


*

*Is a wrong model as it ignores the correlation of observations within the subject.

*Anything can be nested (and in fact, the error is intrinsically nested in models) but this does not really seem to apply to your study design.

*You could fit this model as a fixed-effects model.  See, for example, Allison's Fixed Effects Regression and Fixed Effects Regression Methods for Longitudinal Data Using SAS.  The second I know to be excellent.  I think this is the type of model you are reaching for in #2 and it is applicable.

*Your lmer() call is fitting the 3 observations as simply and constantly correlated.  But you may find they are autocorrelated.  If they are unequally-spaced (as you imply) then a random coefficients model may be better than simple correlation.  If they are equally-spaced then you could use a repeated measures autocorrelation error structure or a random coefficients model (which is slightly more constraining).

