Is a Mixed Model Appropriate for Repeated Measures of Multiple Covariates? I am doing a retrospective cohort study in which I have taken information from 4 health markers: calories, exercise time, work hours, and sleep hours as well as an outcome variable healthsurvey. All variables are continuous, take on only positive values, and are measured monthly across approximately 1000 subjects for two years - essentially, 24 measurements of each variable for each subject. The residuals are Gaussian, and the models below by and large fit the criteria for LMM diagnostics. The head of data looks like this:

There's significant autocorrelation within all dependent variables, and I was wondering how I could craft a model to judge associations between the four independent variables and the outcome. I was thinking a linear mixed model or a GLMM is the best way to go. I loaded nlme and lme4 into R and came up with these ideas, but I just want to know if I'm on the wrong track:
lme(healthsurvey~calories+exercise+laborhours+sleephours, random=calories+exercise+laborhours+sleephours|subject, correlation = corCompSymm(), method = "ML")
But if that didn't work, I was thinking of doing something with lme4, a package I'll admit I'm less familiar with:
lmer(healthsurvey~calories+exercise+laborhours+sleephours+(calories|subject)+(exercise|subject)+(laborhours|subject)+(sleephours|subject), REML=FALSE)
The specifics of variable selection/etc aren't important right now. I'd just like to know if a linear mixed model was a smart way to model this data, and if so, treating each of my covariates as random effects since they vary across subjects.
 A: 
Is a Mixed Model Appropriate for Repeated Measures of Multiple Covariates?

Yes, you have repeated measures within subjects, and you are not interested in specific subject effects, so a mixed model is appropriate for modelling these data.
There are a few things to note here.

*

*The structure of the random effects in the two models are not equivalent. The lme model will estimate covariances between all the random effects, while the lmer model will not. To be equivalent, you would fit:

lmer(healthsurvey ~ calories + exercise + laborhours + sleephours + (calories + exercise + laborhours + sleephours | subject), REML = FALSE)


*

*The random structure is quite complex; it will estimate 15 variances and covariances and it would not be surprising to find a singular fit. Your 2nd model is actually one approach to simplifying the random structure in such a case.


*You mention autocorrelation, so you might want to explore an AR(1) correlation structure in the lme model.


*You may be interested in contextual effects - that is, in between-subject and within-subject effects for the fixed effects. In order to do this, for each fixed efect variable, you would create a new variable consiting of the means for each subject, and then another variable being the difference between the original variable and the group mean. Then you include these two new variables in the model, but not the original one.


*Your models do not include time which implies that you are not interested in any temporal effects.
