I'm trying to build mixed-effects models but having trouble working out what the best model structure is. I have 4 variables: individual ID, time $t$, biomarker $x$ and biomarker $y$, both continuous and expected to change over time. Gradients and intercepts for both $x$ and $y$ will vary by each individual, but the hypothesis is that a rise in $x$ will correlate with a rise in $y$. I'm using lme4
in R.
From this tutorial I see they run
lmer(weight ~ Time * Diet + (1 + Time | Chick), data=ChickWeight, REML=F)
for a similar data structure except that Diet is constant over time for each chick, whereas my $x$ is continuous and time-dependent. Do I need to change the model structure to account for this, or would:
lmer(y ~ t * x + (1 + t | id), data=df)
be sufficient for my problem?