# Thread: Help with mixed model?

1. ## Help with mixed model?

I would appreciate some help figuring out how to analyze a new data set I'm collecting. Most of my experience is with linear regression and ANOVA, but I have some data with unique requirements. I attached an excel sheet showing sample data. Note that I'm an SPSS user, but if possible I can use R to get through it (with some help!).

I have multiple subjects, each viewing multiple trials (i.e., repeated measures), and producing behavior data during each trial. I have several outcome variables I want to predict (accuracy, efficiency, etc).

Predictors (at what level):
P Expertise (subject)
P Vision (subject)
Trial Difficulty (trial)
Trial Rarity (trial)
Fixations (trial level, but produced by subject)
Fixation Duration (trial level, but produced by subject)

Dependent Variables
Accuracy (binary)
Efficiency (in seconds)

My initial thought is to run a binary logistic multiple regression to assess accuracy, and include interaction terms guided by hypotheses. But since each sample is not independent (i.e., there are multiple responses per participant), I assume that wouldn't be kosher.

I have gotten everything to work with Generalized Estimating Equations, but I am not certain that was appropriate. I'm assuming I need some form of a linear mixed model, but I'm not really certain how to make or interpret those.

Looking for an expert on these topics who can do some hand-holding (maybe with a thank you via paypal?).

2. ## Re: Help with mixed model?

I prefer to use r for mixed effect models. The syntax is pretty simple and intuitive, i.e. in the following regression:

response ~ random effect + random effect + (1|fixed effect) + (1 + variable that affects slope|fixed effect)

The (1|fixed effect) term is for the intercept, and the other is for the slope. Pretty easy syntax.

But to answer your question, yes, you do need to incorporate a fixed effect (subject) into your model. Mainly what you seem to be talking about is something called psuedoreplication.

a generalized linear mixed model would be the correct solution. Just include a fixed effect term to take care of the psuedoreplication.

Good luck!

3. ## The Following User Says Thank You to the42up For This Useful Post:

tbrass (03-20-2016)

4. ## Re: Help with mixed model?

Originally Posted by the42up
I prefer to use r for mixed effect models. The syntax is pretty simple and intuitive, i.e. in the following regression:

response ~ random effect + random effect + (1|fixed effect) + (1 + variable that affects slope|fixed effect)

The (1|fixed effect) term is for the intercept, and the other is for the slope. Pretty easy syntax.

But to answer your question, yes, you do need to incorporate a fixed effect (subject) into your model. Mainly what you seem to be talking about is something called psuedoreplication.

a generalized linear mixed model would be the correct solution. Just include a fixed effect term to take care of the psuedoreplication.

Good luck!
Thank you for hte help! Do you think that a Generalized Estimating Equation is a suitable replacement for a mixed effects model? Basically I want to be running a regression with interactions, but accounting for the "pseudoreplication" - from what I can understand, the Generalized Estimating Equation can do that?

If not, I'm going to need to find some helping putting together a linear mixed effects model in R!

5. ## Re: Help with mixed model?

A Generalized estimating equation most certainly will account for psuedoreplication, its just not my usual cup of tea when dealing with human subjects. The usual rule of thumb is that if you only care about making a population level inference then you use the GEE, if you want to make some inference about the subjects, you use a mixed model.

For example-
GEE: i wanted to test the effects of a training program, I would find that men run faster than women and kept gains over time
MEM: i wanted to test the effects of a training program, I would find that men run faster than women and kept gains over time conditional on the person's BMI

More practically speaking, neither is the perfect solution. You need a certain number of clusters (>40) to make a GEE work and it falls apart with missing data when dealing with human subjects. Conversely, a mixed effects model can be misspecified.

Another practical point, mixed effects models are more widely used than generalized estimating equations due to the more wider applicability. This makes them more familiar to journal reviewers...i.e. less head aches.

 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