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_proficiencymight not be interesting / applicable. – dipetkov Aug 28 '22 at 12:17