Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Linear Mixed Models in R - how to add a covariance

$
0
0

I am doing a LMM analysis with data from an attentional task. The response time is the dependent variable and the group (bipolar patients vs. controls), perceptual load (high perceptual load vs. low perceptual load) and emotion of distractors (angry, happy, neutral) are the fixed effects.

My code, so far, is this:

mod3 = lmer(df$RT ~ df$Group * df$Load * df$EmotionDistractor +
            (1|df$Subject) + (1|df$Trial))

Is this correct?

I am also interested in adding covariables, namely, state-anxiety and attentional scores. How should I do that?

I am really new in R and it's the first time doing this type of analysis so I really appreciate your comments!

Best,

Joana


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>