Employees in three job categories of an airline company were administered an activity preference questionnaire consisting of three bipolar scales: X1 outdoor-indoor preferences; X2 convivial-solitary preferences; X3 conservative-liberal preferences.

Given matrices W and T, test the hypothesis that the three group centroids are significantly diffenent from one another.


/* H0: mu1 eq mu2 eq mu3 */
proc iml;
start;
k = 3;
n1 = 85; n2 = 93; n3 = 66;
w = {
3967.8301 351.6142 76.6342,
351.6142 4406.2517 235.4365,
76.6342 235.4365 2683.3164};
t = {
5540.5742 -421.4364 350.2556,
-421.4364 7295.571 -1170.559,
350.2556 -1170.559 3374.9232};
p = nrow(w);
dw = det(w);
dt = det(t);
lambda = dw/dt;
print lambda;
n = n1+n2+n3;
c = (n-p-2)/p;
f = (1-sqrt(lambda))/sqrt(lambda)*c;
print f;
df1 = 2*p;
df2 = 2*(n-p-2);
print df1, df2;
finish;
run;

updated