One of the most confusing things about mixed models arises from the way it’s coded in most statistical software. Of the ones I’ve used, only HLM sets it up differently and so this doesn’t apply.
But for the rest of them—SPSS, SAS, R’s lme and lmer, and Stata, the basic syntax requires the same pieces of information.
1. The dependent variable
2. The predictor variables for which to calculate fixed effects and whether those [Read more…] about Mixed Models: Can you specify a predictor as both fixed and random?
Tagged With: fixed effect, linear mixed model, random effect, Random Factor, Repeated Measures
Why Mixed Models are Harder in Repeated Measures Designs: G-Side and R-Side Modeling
I have recently worked with two clients who were running generalized linear mixed models in SPSS.
Both had repeated measures experiments with a binary outcome.
The details of the designs were quite different, of course. But both had pretty complicated combinations of within-subjects factors.
Fortunately, both clients are intelligent, have a good background in statistical modeling, and are willing to do the work to learn how to do this. So in both cases, we made a lot of progress in just a couple meetings.
I found it interesting, through, that both were getting stuck on the same subtle point. It’s the same point I was missing for a long time in my own learning of mixed models.
Once I finally got it, a huge light bulb turned on. [Read more…] about Why Mixed Models are Harder in Repeated Measures Designs: G-Side and R-Side Modeling
Tagged With: g-side, linear mixed model, r-side, random effect, repeated effect, Repeated Measures
Specifying Variables as Within-Subjects Factors in Repeated Measures
I recently received this great question* from a reader:
I want to do a GLM (repeated measures ANOVA) with the valence of some actions of my test-subjects (valence = desirability of actions) as a within-subject factor. My subjects have to rate a number of actions/behaviours in a pre-set list of 20 actions from ‘very likely to do’ to ‘will never do this’ on a scale from 1 to 7, and some of these actions are desirable (e.g. help a blind man crossing the street) and therefore have a positive valence (in psychology) and some others are non-desirable (e.g. play loud music at night) and therefore have negative valence in psychology.
My question is how I can use valence as a within-subjects factor in GLM. Is there a way to tell SPSS some actions have positive valence and others have negative valence ? I assume assigning labels to the actions will not do it, as SPSS does not make analyses based on labels …
[Read more…] about Specifying Variables as Within-Subjects Factors in Repeated Measures
Tagged With: linear mixed model, repeated measures anova, within subject factor
Repeated measures ANOVA is the approach most of us learned in stats classes for repeated measures and longitudinal data. It works very well in certain designs.
But it’s limited in what it can do. Sometimes trying to fit a data set into a repeated measures ANOVA requires too much data gymnastics. [Read more...] about When Does Repeated Measures ANOVA not work for Repeated Measures Data?
Tagged With: crossed random effects, generalized linear mixed model, GLMM, linear mixed model, Marginal Model, Repeated Measures, repeated measures anova, time-varying covariates