I would start by fitting a mixed effects model to these data. I wouldn't really call it multilevel as you don't appear to have grouping factors nested within each other. But this is just semantics and/or a matter of opinion. Clearly measurements are clustered within persons, so you could fit a model such as:
Y ~ X + (1|Subject)
and this will adjust the analysis for observations of one person being more similar to observations of the same person from week to week. i.e. to account for non-independence.
If week
is purely a nuisance variable, then you could fit a crossed random effects model:
Y ~ X + (1|Subject) + (1|week)
This is crossed and not nested, since each observation "belongs" to one particular person, but that person does not "belong" to a particular week, and the same applies in vice-versa - an observation also "belongs" to a particular week, but that week does not "belong" to a particular person. More about crossed vs nested random effects can be found here
If the variance at the week
level is sufficiently small you could remove it, applying the principle of parsimony, and go back the previous model. A likelihood ratio test could inform this, though clinical/expert domain knowledge should have the last say. This of course does not rule out the possibility of a *systematic' effect of week
.
If there is systematic effect of week
, then you could also consider either
Y ~ X + week + (1|Subject)
or
Y ~ X + week + (week|Subject)
to allow the "effect" of week
to vary across each Subject
.
Noting that you have 5 week
points, you could code week
as a factor, which could potentially uncover non-linearities, though the first of these it would provide 4 coefficient estimates, rather than 1 if you include it as continuous. In the 2nd model including week
as a factor would also increase the number of random effects considerably, which could impede model convergence (especially as you have a small dataset) and also impede interpretation. That is, the data may not support that random structure.
There is also the option to allow the effect of X
to vary across each Subject
, for example:
Y ~ X + week + (X + week|Subject)
Note that in a regression model such as this, X
is considered to be fixed, while Y is random - that means there should be no (or negligibly small) measurement error in X
. If the situation is reversed then the dependent variable should be X
. However if both variables are measured with error then it may be necessary to look at mixed effects model with errors in variables