I have data from a study where participants completed 3 interventions in a randomized order (1 week washout period), and where in every intervention, outcome measures were taken every 15 minutes over the intervention duration (3 time points). I therefore have two levels of repeated measures. My data in long form in SPSS looks like this:

ID Intervention Time Outcome
1 1 1 0.42
1 1 2 0.55
1 1 3 0.41
1 2 1 0.51
1 2 2 0.59
1 2 3 0.52
1 3 1 0.42
1 3 2 0.46
1 3 3 .
2 1 1 0.37
2 1 2 0.42
2 1 3 0.41

(and so on for other participants, with some sparse missing data as shown in example)

I'm trying to see the effect of the different conditions, as well as time and interaction between these factors on my outcome using a linear mixed model in SPSS. However, I am confused as to how I should input this into SPSS. I've tried putting both condition and time as repeated measures with unstructured covariance type, and this leads to the "Model cannot be fitted because number of observations is less than or equal to number of model parameters" warning.

I currently have Time, Intervention, and Time*Intervention as fixed effects in my model, and ID as a random effect, due to a random intercept between participants.

Is this a problem with the way my data is organised, how I'm running the model, or both?


1 Answer 1


Your data structure and model outline seem correct to me. I think the problem lies in the SPSS syntax you are using. You mentioned you put time and intervention in as repeated measures (I assume this happens in SPSS Mixed model dialogue). But you say you are using them as fixed effects, and not as random effects (which seems reasonable to me), so there is no need to put them into the repeated box, and actually, if you also have them as fixed effects, you can't use them as random effects. I think this is what produces the error (however, see edit at the end).

Just use participant id as a random factor (put it into the "Subjects" box in the SPSS Mixed models first dialogue box, and then specify the id-related random intercept in the random dialogue box by moving id to the right and ticking the intercept box).

I think the following syntax would also achieve the above. You may want to change some of the estimation details, I used the defaults, but I believe this is the model structure you are trying to fit (edited to add I used SPSS 29.0):

MIXED outcome BY Intervention Time
  /FIXED=Intervention Time Intervention*Time | SSTYPE(3)
  /EMMEANS=TABLES(Intervention*Time) .

EDIT January 2024 - It has come to my attention that in SPSS you can indeed put your time variable (or the variable representing the repeated element in your design, or even other kind of clustering variable) that you are using as a fixed predictor into the repeated box in order to specify this variable's residual covariance structure, if that is considered necessary. But specifying a "Repeated" variable is not a requirement for running a multilevel model in SPSS, and you can use time as fixed predictor (or as random effect) without specifying it as "Repeated".


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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