I have a modeling situation that I am not 100% sure how to approach. I have two independent variables, information and time, with time being a repeated measure. The dependent measure is difference. When analyzing summary measures of difference collapsed across time, and as theory would suggest, there is a quadratic relationship between information and difference.
Information increases the difference up to a peak, past which higher information results in a smaller difference. I would like to build a model to incorporate time so that I do not have to collapse down to summary measures. Theory and previous data would suggest a linear relationship between time and difference. How should I model this? Currently I have this for my full theory driven model:
full_model_ml <- lmerTest::lmer(difference ~
I((time - 54)/10)*(cinformation + cinformation2) +
(I((time - 54)/10) | id), data = df, REML = FALSE,
control = lme4::lmerControl(optimizer ="Nelder_Mead")).
But I'm not sure is this is the correct approach given the expected polynomial relationship between information and difference, and linear relationship between time and difference.