That is quite close. The key will be to limit the comparisons for group*day, unless comparing Group 1 on Day 0 to Group 3 on Day 14 has some interest for you. I would recommend the following lsmean statements:
lsmean group^day/diff slice=day;
This would give an F test for the difference between groups for each day.
If you wished to be more explicit in your tests, you could construct LSMESTIMATE statements that make the comparisons which are of interest.
Finally, the LSMEAN statement has more options in PROC GLIMMIX. If you changed your analysis to the following
proc glimmix data=B; /*behaviour*/
class group breed animal day;
MODEL VAR=GROUP DAY BREED GROUP*DAY;
random DAY / type= ANTE(1) subject=animal*group residual;
random breed / subject=animal;
lsmeans group*day / slicediff ( group day);
lsmeans group / diff;
lsmeans day / diff;
run;
In addition, with only 3 timepoints, I would specify the type= as type=chol, which would use a Cholesky factorization of an unstructured matrix, just in case there is a marked difference in the variance and covariance as time progressed in your experiment.
SteveDenham
... View more