# 3x2 within subjects design with covariate that is nested within factor (?)

I want to test the differences in my interval-scaled dependent variable - measured at three time intervals (within subj.), for two conditions (within subj.), while accounting for a interval-scaled covariate that has two values per subject (one per condition).

Sample size is low twenties. Data looks like this:

What's the best way to go about testing this?

To my understanding, a typical repeated measures ANOVA struggles with this because the covariate has different values for the same person depending on the second within subject factor. I was wondering if a mixed model could accommodate the design, but my knowledge of lme4 is too limited.

Could someone share an insight?

It seems that this situation could be modeled with a mixed effects model, with crossed random effects (random intercepts) for Subject and Condition:
Outcome ~ Time + Covariate + (1| Subject) + (1|Condition)

However, since there appears to be a 1:1 correspondence between Covariate and Condition and your research question seems to be about the fixed effect of Covariate the random effect for Condition may not be needed (including it may not change the estimate for Covariate but it may reduce the precision of it).
• Is there a 1:1 correspondence between Covariate and Condition which is implied by your sample data and your question where it says " (one per condition)". If so, that will result in a rank-deficient fixed effects model matrix, so you would have to just include Condition as a fixed effect. May 16 '19 at 13:17
• Just to clarify, if Covariate and Condition are perfectly correlated, you can't include both of them as fixed effects (you can still include Time May 16 '19 at 16:18