n1 = 33, n2 = 37, and n3 = 24
s1 = [3352.71 100.09, 100.09 286.97]
s2 = [2647.87 149.22, 149.22 251.57]
s3 = [2948.02 61.00, 61.00 181.83]
Test the null hypothesis that the three population covariance matrices are equal, using alpha = .10.
/* H0: sigma1 = sigma2 = sigma3 */ proc iml; start; k = 3; p = 2; n1 = 33; n2 = 37; n3 = 24; s1 = {3352.71 100.09, 100.09 286.97}; s2 = {2647.87 149.22, 149.22 251.57}; s3 = {2948.02 61.00, 61.00 181.83}; c1 = (1/(n1-1))#s1; c2 = (1/(n2-1))#s2; c3 = (1/(n3-1))#s3; print c1; print c2; print c3; n = n1+n2+n3; c = (s1+s2+s3)/(n-k); print c; d = det(c); d1 = det(c1); d2 = det(c2); d3 = det(c3); m = ((n-k)#log(d))-((n1-1)#log(d1) + (n2-1)#log(d2) + (n3-1)#log(d3)); print m; h = 1 - ((2#p#p+3#p-1)/(6#(p+1)#(k-1))#(1/(n1-1)+1/(n2-1)+1/(n3-1)-1/(n-k))); print h; chi = m#h; df = p#(p+1)#(k-1)/2; print chi; print df; finish; run;