What oop mentioned makes sense. It's a mixed model repeated measures
analysis.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SAS code:
proc mixed data=data;
class group subject;
model y = group day group*day group*day*day / ddfm=kr;
repeated day / type=ar(1) subject=subject;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note:
(1) Although ar(1) is supposed to be the best covariance structure, it would
be better to test other covariance structures such as un (unstructured) and
toep (toeplitz), then compare their information criteria to judge which
covariance structure is the most appropriate one.
(2) If the quadratic interaction term is not significant, drop it from the
mixed model.
(3) You may want to consider some alternative models such as random
coefficient regression models.