/* monkey1.sas */ title 'Primate hippocampal function: Zola-Morgan and Squire (1990)'; /* Science, Vol. 250 (12 Oct. 1990) , Pages 288-290 */ title2 'Multivariate approach to repeated measures (within-cases)'; data memory; infile '/home/u1407221/441s24/data/monkey.data.txt' firstobs=2; input monkey $ treatmnt $ week2 week4 week8 week12 week16; label week2 = 'Trained 2 weeks before injection' week4 = 'Trained 4 weeks before injection' week8 = 'Trained 8 weeks before injection' week12 = 'Trained 12 weeks before injection' week16 = 'Trained 16 weeks before injection'; proc means data=memory mean; class treatmnt; var week2 -- week16; run; proc glm data=memory; class treatmnt; model week2 -- week16 = treatmnt; repeated time profile / short summary mean; run; proc glm data=memory noprint; title3 'Replicate test for main effect of treatment: F=8.08, p=0.0118'; class treatmnt; model week2 -- week16 = treatmnt; manova H = treatmnt M = week2+week4+week8+week12+week16 / short; /* M is a matrix of coefficients for transforming the Response vars */ run; proc glm data=memory noprint; title3 'Replicate tests for main effect of time: Lambda=0.84009249'; title4 'And time by treatment interaction: Lambda=0.44106117'; class treatmnt; model week2 -- week16 = treatmnt; manova H = intercept treatmnt M = week2-week4, week4-week8, week8-week12, week12-week16 / short; run; /* But the real point is that the treatment only affects recent memories, not older ones. A basic MANOVA is really more to the point. Follow up with Bonferroni-corrected univariate tests. 0.05/5 = 0.01. */ proc glm data=memory; title3 'MANOVA, no repeated measures'; class treatmnt; model week2 -- week16 = treatmnt; manova h = treatmnt; run; quit;