I treated 80 people with drug X and 80 with drug Y. I presented the drugs to them in groups of 10 (meow groups). The drug was consumed for 15 weeks. They reported the severity of their headaches (from 1-100) once a week. All individuals are only in one meow group and everyone within a meow group received the same drug. The meow group that a person is in (not only the drug, but the actual meow group of 10) will influence treatment outcomes because the groups meet weekly.

In essence, I have:

  • 2 drugs (treatment)
  • 16 meow groups
  • 160 cases
  • 15 time points

I want to know whether people who received drug X reported less headache intensity over the 15 weeks. Basically, I want to know the headache severity slope for drug X, and whether that differs from drug Y. Please note that I am not particularly interested in the slopes in general, how quickly/when they change, or how the meow groups differed. I am mostly interested in comparing the efficacy of the drugs.

I want to do mixed-modeling. I think treatment condition should be a fixed-factor, time points should be a covariate fixed-factor so that I can estimate a slope over time, and that time points need to be estimated as repeated-measures estimates. I also appreciate that I should run different models and test them and examine fit.

Overall though, what is the most appropriate way to test my hypothesis using a mixed-model design in SPSS (given what information you have)?

This is the SPSS syntax I have so far: MIXED pain BY drug WITH time /CRITERIA=.... /FIXED=drug time drug*time | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(id) COVTYPE(ID) /REPEATED=time | SUBJECT(id) COVTYPE(AR1).

(meow group is missing from this syntax because I don't know where it is supposed to go).

I have a general understanding of what a random and a fixed factor is, but I don't quite understand how these impact each other in practice (please note that I can't read most formulas, so plain English will be needed if you want to help on that front!). For example, how would adding drug (or time) as a random effect influence the estimate of the slopes I am interested in? Similarly:

  • Should time points also be a random effect?
  • How should I handle the "meow group" variable? Fix or random, or both?
  • How does specifying a subject variable impact the random effect’s association with the dependent variable?
  • Is there a minimum number of levels necessary for a variable to be a random effect? I've read that only having two levels does not make it possible.
  • What are the "levels" in mixed-effects modelling referring to? Is student within class within school within school board within state within country a "6-level" model, or are the levels something else?

Lastly, how can I “nest” pain estimates within times, time within cases, cases within groups, and groups within treatments? Are pain ratings automatically nested within cases and time automatically nested within cases and cases within groups? I cannot "nest" group factors in the subject factors using SPSS it seems.

Sorry for all the questions... I figured putting this all in one related post would be better than spamming the front page with 10 questions. I have read previous related answers on this website without finding answers to these questions (but answers to other questions of course!).

Answers to any of these questions would be appreciated (even info on a single question would be great)!

  • 1
    $\begingroup$ "meow"? What's a meow group? $\endgroup$
    – Glen_b
    Apr 4, 2014 at 4:22
  • $\begingroup$ I didn't want to just call them groups because that could confuse treatment groups with just groups, so I called them meow groups. Probably made things more confusing, but there it is! $\endgroup$
    – Behacad
    Apr 4, 2014 at 4:28
  • 2
    $\begingroup$ I remain unenlightened. How does it relate to the model? $\endgroup$
    – Glen_b
    Apr 4, 2014 at 4:36
  • $\begingroup$ They interact regularly and the support/effects of being in these groups could conceivably influence treatment. $\endgroup$
    – Behacad
    Apr 4, 2014 at 4:54

1 Answer 1


I know this is not exactly what you asked but in R (http://www.r-project.org/) I would have run this formula: pain ~ drug + time + (1+time|meow) + (1+time|subject)

Some notes:

  • This should take care of nesting issues.
  • I gave time both a fixed effect and a random effect (since I'm assuming time has some fixed influence that is not related to group/subject and that each group/subject can react differently to time)
  • Regarding leveling - in you case the 16 groups and 160 subjects can be used for random effects. What is your concern here?

I hope this answers some of your questions..

Also, I'm currently researching new ways to automate statistical analysis. My focus is on enabling users to easily create mixed models - Will you be willing to share your data with me so I could try and see analysis results with your data...


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.