How should I include time in generalized linear mixed models? Generalized linear mixed models are more and more common in my field of dementia research. For example, it is common to examine how different factors associate with memory decline. However, I am a bit confused as to how one should incorporate time in these models.
As an example, let's assume I want to know whether grip strength is associated with memory decline in dementia over a maximum of 10 subsequent visits to the research center. Both grip strength and memory will be assessed at each of the study visits, if possible, and due to the nature of the study population, there will be a lot of missing data due to drop-outs.
So, I would use memory test performance as my target variable, grip strength and other factors known to associate with memory performance, such as age, education and gender as my fixed effects and subjects as random effects, right? But here is where I get a bit confused: the SPSS guide for GLMM recommends adding the time (such as the study visit variable) as a repeated measure in the data structure tab of SPSS. (https://www.ibm.com/docs/en/spss-modeler/18.3.0?topic=node-generalized-linear-mixed-models)
But then I see papers where the authors say they used time as a fixed effect.
So, my questions are:

*

*Do I need to specify the repeated measure in the model at all, or does the model just use all of the data specified by the subjects in any case?

*What is the difference between the visit as a repeated measure versus including it as a fixed effect? I am not interested in the association of time on memory decline itself, since it is pretty obvious, but I am not sure how to properly incorporate it in the analysis.

Thank you in advance!



*

*Do I need to specify the repeated measure in the model at all, or does the model just use all of the data specified by the subjects in any case?


By including the random intercept for subject in the mixed model, you are accounting for the correlation between memory measurements taken from the same subject.



*What is the difference between the visit as a repeated measure versus including it as a fixed effect? I am not interested in the association of time on memory decline itself, since it is pretty obvious, but I am not sure how to properly incorporate it in the analysis.


A fixed effect of time, which could be in the form of a continuous measure (assuming a linear effect, but could also include quadratic terms for non-linear effects - look at your data) or a series of 0/1 indicators for each visit after the first (completely non-linear, but non-optimal due to the fact that people drop out), further adjusts for the possibility that memory declines over time. You might include this if you were worried that any association between grip strength and memory would be confounded by the fact that your subjects are getting older and accordingly, both grip strength and memory would be expected to decline.
You could further examine this by interacting time with grip strength in the model to see whether the grip strength-memory association decreases or increases over time. Basically, having a fixed effect for time provides you flexibility in the modeling that you do not have if you throw time into the "repeated" statement. I would say that the repeated approach treats time more as a nuisance than as something of substantive interest.
