I want to fit a mixed model for repeated measures (mmrm) on a set of panel data with 6 visits and N = 1200. I want to estimate the effect of time passing on the outcome, without any intervention since it's a panel study. So I wanted to fit the model using the mmrm package. It went well and the estimates are looking good and reasonable. But I wonder if mmrm have to satisfy the same assumptions as other random effects models (linearity, normality of residuals, homogeneity of variance and independence of errors afaik) and if my code for the model is correct.
If all the assumptions have to be met how do I do that using R? How to handle a violation of the assumptions?
I chose an autoregressive structure since the correlation of the timepoints should decline over time.
Here is the code:
mmrm_model <- mmrm(outcome ~ sex + age + education + time + ar1(time|subject_id),
method = "Kenward-Roger",
data = data)
emmeans.mmrm <- emmeans::emmeans(mmrm_model, specs = "time")
Thank you very much for your advice!