This post is related to my previous ones, but now I'm looking at each year separately (i.e, this is not a repeated measures design). My data set looks like this:
SUBJECT PROFICIENCY (in Eng) SCORE LANGUAGE
PETER 100 154 Spanish
PETER 100 132 English
MARY 95 191 Spanish
MARY 95 139 English
So each SUBJECT was tested twice: one test in English and one test in Spanish. Therefore, each SUBJECT has 2 exam scores. I want to see the impact of Language on the test scores. However, I already know that Proficiency in English is highly correlated to the test score in English:
What I'm wondering is if I can fit a model in which I could use proficiency as a "moderator" (something like a partial correlation). My idea was to fit a model with a random intercept for Proficiency. The thing is, I only have one Proficiency score per student (I don't have a Proficiency score for Spanish). Hence, I have two entries for Language and one for Proficiency (in Eng).
Would this make sense:
mod1 <- lmer(ExamScore ~ LANGUAGE + (1 | SUBJECT) + (1|PROFICIENCY IN ENG), data = data)
I have seen similar questions elsewhere with a categorical moderator (here and others
Thanks in advance, any thoughts would be much appreciated :)
Spanish_score ~ English_score + English_proficiency
might not be interesting / applicable. $\endgroup$Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 147.712 4.924 30.000 < 2e-16 *** LANGUAGEL2 -35.076 7.089 -4.948 2.66e-06 ***
So my interpretation is "the score decreases by 35 points when the task is performed in Eng in relation to when its performed in Span" (b0 = 147, b1 = -35) $\endgroup$