************** * sheep2.sas * **************; options pageno=1 nodate; data sheep2; input time1-time6 no2 sheep; group1=(no2=1); group2=(no2=2); group3=(no2=3); cards; 2.197 2.442 2.542 2.241 1.960 1.988 1 1 1.932 2.526 2.526 2.152 1.917 1.917 1 2 1.946 2.251 2.501 1.988 1.686 1.841 1 3 1.758 2.054 2.588 2.197 2.140 1.686 1 4 2.230 3.086 3.357 3.219 2.827 2.534 2 5 2.398 2.580 2.929 2.874 2.282 2.303 2 6 2.054 3.243 3.653 3.811 3.816 3.227 2 7 2.510 2.695 2.996 3.246 2.565 2.230 2 8 2.140 3.896 4.246 4.461 4.418 4.331 3 9 2.303 3.822 4.109 4.240 4.127 4.084 3 10 2.175 2.907 3.086 2.827 2.493 2.230 3 11 2.041 3.824 4.111 4.301 4.206 4.182 3 12 ; run; /* This call to PROC GLM tests for parallelism and group effects */ proc glm data=sheep2; model time1 time2 time3 time4 time5 time6=group1 group2 group3 / noint nouni; contrast 'Parallelism' group1 1 group2 0 group3 -1, group1 0 group2 1 group3 -1;*This is how to specify A; manova m=(1 -1 0 0 0 0, 0 1 -1 0 0 0, 0 0 1 -1 0 0, 0 0 0 1 -1 0, 0 0 0 0 1 -1); /* test of parallelism */ manova m=(1 1 1 1 1 1); /* group effect assuming parallelism */ manova m=(1 0 0 0 0 0, 0 1 0 0 0 0, 0 0 1 0 0 0, 0 0 0 1 0 0, 0 0 0 0 1 0, 0 0 0 0 0 1); /* group effect w/o assuming parallelism */ run; /* This call to PROC GLM tests differences in time */ proc glm data=sheep2; model time1 time2 time3 time4 time5 time6=group1 group2 group3 / noint nouni; contrast 'Time (if parallel)' group1 1 group2 1 group3 1; contrast 'Time (not parallel)' group1 1 group2 0 group3 0, group1 0 group2 1 group3 0, group1 0 group2 0 group3 1; /* in last contrast, could have just said group1 1, group2 1, group3 1; */ manova m=(1 0 0 0 0 -1, 0 1 0 0 0 -1, 0 0 1 0 0 -1, 0 0 0 1 0 -1, 0 0 0 0 1 -1); run; /* This call to PROC GLM tests differences in time for group 1 only */ proc glm data=sheep2; model time1 time2 time3 time4 time5 time6=group1 group2 group3 / noint nouni; contrast 'Time (group1 only)' group1 1 ; manova m=(1 0 0 0 0 -1, 0 1 0 0 0 -1, 0 0 1 0 0 -1, 0 0 0 1 0 -1, 0 0 0 0 1 -1); run;