I have a daily diary dataset with daily ratings of mood (e.g., daily rating of happiness) between two treatment conditions. The complete number of days of ratings vary widely across participants and there is missing data, i.e., participants forgot to fill out a form on a particular day.
I am ultimately interested in whether the experimental treatment group outperforms the control in time course of daily mood ratings. An example with the random intercept of participant, linear fixed and random effects of time (centered at/interpreted as first day of diary recording), fixed effect of treatment group, and their interaction is provided below:
happy.trt = lme(fixed= happy ~ 1 + time*Trt,
random = ~time|id,
correlation = corCAR1(form = ~time|id),
data = data,
na.action=na.exclude)
I am specifically wondering about the correlation = corCAR1(form = ~time|id)
. Based on some reading(Autoregression in nlme - undestanding how to specify corAR1), it seems the AR(1)
covariance structure would be inappropriate because of the unequal spacing between diary entries due to missing data.
However, I am wanting to also test for nonlinear effects of time in the mood ratings. I.e., random and fixed quadratic time
and cubic time
effects. What does this mean for the continuous AR(1) structure? Would I modify it to include the nonlinear time vars, e.g., correlation = corCAR1(form = ~time + time_quad + time_cubic|id)
?