* Timm: Table 3.4.1 Two instructors use different methods to teach algebra; title 'Two-Sample Hotelling T2'; data mathscor; input group BM WP; label BM='Basic Math' WP='Word Problems'; datalines; 1 190 90 1 170 80 1 180 80 1 200 120 1 150 60 1 180 70 2 160 120 2 190 150 2 150 90 2 160 130 2 140 110 2 145 130 ; proc print; /* (1) Standard analysis with GLM Note: Hotelling's T**2 is equivalent to the MANOVA tests - all have the same F-approximation and p-value. - T**2 = dfe * Hotelling-Lawley trace */ proc glm data=mathscor outstat=stats; class group; model BM WP = group / nouni; manova H=group / printH printE; run; /* (2) Similar analysis produced by DISCRIM or CANDISC, but gives discriminant function coefficients and output scores */ proc discrim data=mathscor pool=test noclassify MANOVA canonical ncan=1 out=scores; class group; var BM WP; proc print data=scores; var group BM WP CAN1; run; /* (3) T**2 = t**2 based on discriminant scores */ proc ttest data=scores; class group; var can1; title2 'Univariate t-test on Discrim scores'; run;