In lme, should the observations only before/after an intervention be excluded in mixed, interrupted time series model?
We are examing whether y changes in level and/or slope following an event using an interrupted time series (ITS) model. Given that there are several observations per user across time, we are using the following mixed model:
There are some users with y values only before event, and some only after the event.
Should these users (about 1/3rd in all) be excluded before fitting the above model?
Yes, you should include them. Those individuals don't provide any information about the event or time:event parameters, but they do provide information about the level (intercept) and slope of the time series for whichever period (before vs after) they were observed in (as well as the correlation, heteroscedasticity, and residual variance terms).
In my opinion you should probably try to use the maximal random effects formula ~time + event + time:event|user_id; that is, the effect of the event on level and slope might vary among users. A similar argument for including users with only-before or only-after data applies here as well; these individuals won't contribute to the estimate of the variance, but they still provide information about other parameters.
Depending on how much data you have, there might be a practical problem with estimating a 4x4 covariance matrix (in which case you could try a compound-symmetric or diagonal model â look for information on pdCompSymm or pdDiag ...)