0
$\begingroup$

I have a question about how to analyze the results of a study I conducted. The study occurred on a remote island with a very small, unique population and in children. In order to be minimally invasive, the groups were not determined randomly and were instead assigned by school (only 2 schools on this island):

School 1: Control Group (no intervention)

School 2: Intervention Group

I took baseline measures on week 1, then post-intervention measures on week 2.

I ran repeated measures ANOVAs for each outcome, with group and time as the two factors, but believe this is insufficient because the participants were not randomized and clearly have different baseline measurements and slopes over time. I believe the best way to account for this would be to run linear mixed models, however, I'm having trouble in R. Most of the time when I run models I get the following error:

"Error: number of observations (=104) <= number of random effects (=112) for term (Timepoint | id); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable"

Where "id" refers to the individual subject id.

However, I'm not 100% I'm running the correct code for what I'm trying to do. This is what I've been running:

model <- lmer(Outcome ~ Timepoint + Group + (Timepoint | id), dataSet)

I'm assuming time and group are fixed effects, but I need to also account for individual subject (id) differences in intercept and slope, and I'm not sure how to correctly integrate this into the model while avoiding the above message. An example of the code for the correct model would be much appreciated.

$\endgroup$
  • $\begingroup$ The error is telling you that you have more random effects in id than you have available data, is this possible? $\endgroup$ – user2974951 Aug 22 at 5:58
  • $\begingroup$ Thanks for your comment. Yeah, it's strange. I only have 49 participants with complete data (i.e. pre- and post- intervention). 26 and 23 in each group. I'm not sure where those error numbers are coming from... $\endgroup$ – Dr Wampa Aug 22 at 13:48
  • $\begingroup$ It would help if you post your data in the question, otherwise it's hard for us to say what is going on. $\endgroup$ – user2974951 Aug 23 at 7:47

Your Answer

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

Browse other questions tagged or ask your own question.