I'm working with linear mixed modeling to analyze some tricky repeated measures data: Participants provided saliva samples three times each day, for three days, at three separate timepoints (baseline, 3 months, and 10 months). That is, we have samples nested within days nested within timepoints nested within participants.
I'm looking for advice on how, theoretically or in any piece of software, to specify a covariance structure for the repeated measures. The issue is that the model should predict different covariances depending on whether the saliva samples in question are within the same day, on different days, or at different timepoints.
For this post I'll use the following format to refer to data points:
[3,2,1] = timepoint 3, day 2, sample 1<.tt>
I can make SPSS understand the structure of the data to the extent that it knows what order the data points come in, but I don't know how to specify that samples, days, and timepoints are different kinds of intervals. When it creates the table of covariances of residuals, it just lays them all out in a big square, with the same relationship between [1,3,2] and [1,3,3] that there is between [1,3,3] and [2,1,1].
So, if I use an AR(1) covariance structure, it tries to estimate a single rho parameter to model the relationship between pairs of residuals, whether they're an hour apart, a day apart, or several months apart! All the covariance structure options I'm familiar with have this problem, except for unstructured.
Here's my code, if that helps.
MIXED horm by sample timepoint
/CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(5) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
/FIXED= sample timepoint sample*timepoint | SSTYPE(3)
/METHOD=REML /PRINT= SOLUTION TESTCOV
/RANDOM=INTERCEPT | SUBJECT(id) COVTYPE(VC)
/REPEATED=timepoint*day*sample | SUBJECT(id) COVTYPE(AR1).
Line 3 specifies that I'm predicting fixed effects for sample and timepoint (but not for day). Line 5 shows that I'm predicting a random intercept for each participant. Line 6 shows the repeated measures structure (sample within day within timepoint), and the default AR1 covariance structure.
To anyone who read through this, thank you for your time!