2
$\begingroup$

For a statistical analysis of a medical treatment I want to use an LMM (linear mixed model) and am quite unsure on how to do that correctly, in particular in SPSS (which is the license I have obtained for this analysis). For simplicity I renamed every parameter to an intelligible example which conveys the same problem (but doesn't expect anyone to know medical terminology).

I have around 50 schools (patients), each of which have between 5 and 50 students (tumors) who took a crash course mathematics (treatment). Previous analysis' have already found the test to be effective, so while potentially interesting (meaning: I'd take the result of effectiveness of the course and compare it to previous results, if it were easy to analyse) I am not trying to figure out whether or not this course actually improves the students' ability to do maths. Instead, I want to group the students (those from the language focussed classes, those from history and geography and those from sports classes - "localisation" of the tumor within patient's body) and test, whether the crash course improvement of students' abilities is statistically significantly greater for any of the three groups. The naive approach is to simply compare one group's results before, during and after the crash course (three tests at different points in time where my data is just the result of the test for every student that took it - in reality specific measurements after each treatment cycle) to a different group's results in a t-test or an ANOVA. These results entirely disregard the dependencies of students from the same school though (which, in reality, is much worse for tumors coming from the same patients), who might have had the same teachers or the same overall focus. Also, the repeated measurements for the same students will skew the results.

My research brought me to a Linear Mixed Model, which is supposed to be the correct concept for such a test. Since my statistics class didn't cover LMMs, I am very much unsure how to setup the model correctly. In particular, which of my parameters (time, group, student, school) is a factor, which a covariat, how do I make sure that different students from the same school are not considered independent from one another, and how to I implement the model in SPSS? The documentation on SPSS's LMM is laughably bad, but it is the only program I have access to.

I am working with SPSS 29.0.0.0 and have the following dialogue windows for LMM: First dialogue window for linear mixed models in SPSS 29

Second dialogue window for linear mixed models in SPSS 29

$\endgroup$

1 Answer 1

1
$\begingroup$

I must admit that the question is somewhat confusing. Do you have students in schools or tumors in patients ?? Anyway, a linear mixed model seems like a good approach to your problem.

Obviously, the dependent Variable is the test scores of the students. As for the other variables, Group is he type of class (language, history/geography, sports). This is a categorical variable. Time is the timing of the test (before, during, after). This is also categorical but can be treated as a continuous variable if the timing is equally spaced. For the random effects, you have students nested within schools, to account for the non-independence of students within the same school, and repeated measures within the same student.

In SPSS, go to Analyze > Mixed Models > Linear….. The screen should look like this:

enter image description here

Select your dependent variable (test scores). Under “Subjects,” select the variable that identifies your schools. Under “Repeated,” select the variable that identifies your students. For fixed effects, include group, time, and any interaction terms you are interested in (like group*time). For random effects, you can start with random intercepts for schools. You might also consider random slopes if you hypothesize that the effect of time varies by school or student. Specify your covariance structure. A simple starting point is the diagonal structure, but you may need to try different structures based on model fit. Model Checking:

After running the model, check the model fit (like -2 Restricted Log Likelihood). Look at residuals to check for normality and homoscedasticity. Consider using information criteria (AIC, BIC) for comparing models if you try different covariance structures or random effects.

The fixed effects will tell you about the average effect of the group and time on test scores. Interaction terms (if included) can tell you if the effect of the crash course varies by group.

Make sure your data is properly formatted for mixed models. Each row should be a unique student-time observation.

Given that LMMs were not covered in your statistics class, you might want to consult additional resources or seek guidance from a statistician. Finally, while SPSS can handle LMMs, it might not be as flexible or informative as some other statistical software packages. If you find SPSS's capabilities limiting, consider seeking access to software like R OR Python (which are free) better community support.

$\endgroup$
2
  • $\begingroup$ My actual data is tumors within patients, but I found the terminology potentially too confusing so decided that explaining my question in a more intelligible setting would be helpful. I have sought guidance from a statistician as well, which got me this far, in particular that using a t-test or ANOVA is not appropriate due to dependencies of the results. Moreover, they could only help me superficially for now (next available appointment sometime in a month or two), but told me to "put both school and student as subjects" and "take time as repeated measurement". This differs from your idea? $\endgroup$
    – Sellerie
    Commented Dec 30, 2023 at 12:58
  • $\begingroup$ So, the model will be the same if on the one hand I define "time" as a repeated measurement in SPSS or on the other hand I use "student ID"? $\endgroup$
    – Sellerie
    Commented Dec 30, 2023 at 19:49

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.