# Thread: linear mixed model in SPSS - how?

1. ## linear mixed model in SPSS - how?

Hi guys,

Imagine a nonrandomized trial with 2 groups (control and treatment) and two time points (pre and post). An ANOVA of change seems superior to an ANCOVA for this design (1). The interaction term for a repeated measures ANOVA would be 100% equivalent to the ANOVA of change (1). And a linear mixed model can be run to be equivalent to ANCOVA of the ANOVA of change (1). However, there is where I get lost. I get the same values by running an ANOVA of change and running rANOVA, but I can't make any sense on how to run the lineair mixed model.

Information:
- 2 treatments
- 2 time points: pre and post
- dependent outcome: blood glucose

I managed to transform my data set in SPSS appropriately, but from their on I'm lost.

If I go: analyze --> mixed model --> linear, I have no idea what to select in the first window:

Subjects: participant number?
Repeated: time?
Repeated covariance type: ????
Or should I ignore the first window?

Second window:

Dependent variable: blood glucose
Factors: treatment + time???

Then press button fixed: select treatment?
Then press button random: select time?

If I choose those options I get all kind of output, but no values equal to want the rANOVA and ANOVA of change gave me. And from the values that I do get, I have no idea how to interpretent them.

I hope I provided all the information you need to help me. I really want to learn this. Big thanks in advance

1) http://www.ncbi.nlm.nih.gov/pubmed/16895814

2. ## Re: linear mixed model in SPSS - how?

If I go: Analyze --> Mixed --> Linear
- skip the first window (LMM: specificy subjects and repeated)
- In the second window (LMM):
1) Dependent variable: blood glucose
2) Factors: treatment (treatment), time and participant number (id)

Then:
1) Button Fixed:
Enter in the model: treatment, time and treatment*time
2) Button Random:
Subject ID

This will result in data that give me the correct interaction values (same as with rANOVA and ANOVA of change)

However, it also gives a value for a time effect. But I want that value to be seperate for the control and the treatment group. I can archieve this by going to DATA --> SPLIT FILE --> organize output by groups: treatment. Then it gives the proper values for time effects, but it no longer gives an interaction value for the whole group. Is this a problem or is it ok to look up those values in seperate analysis?

Another question, is it a problem to do a LMM when you have a nonrandomized design, because you select subjects as a random factor?

3. ## Re: linear mixed model in SPSS - how?

Hi BBD,

First, I have found that the menus for SPSS Mixed are incredibly counterintuitive and, as you've found, really hard to figure out.

It's really easy to mis-specify a mixed model *anyway*, so I always recommend using the syntax only for mixed models. You just have more control over exactly what it's doing. If you want, once you get the syntax correct, you can go back and figure out the menus to replicate your results.

I assume you already have your data in long format, because you say you transformed your data.

So try this syntax:

MIXED DV BY Time Trt
/FIXED=Time Trt Time*Trt
/METHOD=REML
/REPEATED=Time|Subject(SubjectID) COVTYPE(CS).

(disclaimer, I didn't test this, but I'm pretty sure that's correct for this design).

You need the covtype to be CS in order to match the GLM Repeated Measures results.

Karen

 Tweet

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts