Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STAT 3690 Lecture 15

2022


Testing for equality of covariance matrices (J&W Sec.  6.6)

● Model: m independent samples, where

-  x11 , . . . , x1n1     MVNp (u1 , 51 )

-  

-  xm1 , . . . , xmn.     MVNp (um , 5m )

● Hypotheses H0  : 51  = . . . = 5m  v.s. H1  : otherwise

● MLE of (u1 , . . . , um , 51 , . . . , 5m )

-  Under H0

*  i  = i  = n xij

*  i  = (    i ni )_ 1 SSPw  = (    i ni )_ 1        ij (xij  _ i )(xij  _ i )T  for all i

-  No restriction on 5i

*  i  = i  = n xij

i  = ni(_)1 (ni _ 1)Si  = n (xij  _ i )(xij  _ i )T

● Likelihood ratio

λ =  i     ┌ ┐nm /2

-  Spool  = (   i ni _ m)_ 1 SSPw


 

M = _2 ln

i


 

 

╱ \(nm _ 1)/2


-  Under H0

(1 _ u)M s χ2 (p(p + 1)(m _ 1)/2)

* u = (    i (ni _ 1)_ 1 _ (    i ni _ m)_ 1 }(6(p + 1)(m _ 1)}_ 1 (2p2 + 3p _ 1)

●  Rejection region at level α

…x11 , . . . , x1n1 , x21 , . . . , xmn.   : (1 _ u)M > χ1(2) _α,p(p+1)(m _ 1)/2

● p-value

1 _ Fχ1(2) − a,p(p+1)(. − 1)/2 ((1 _ u)M }

 

●  Exercise: factors in producing plastic film (continued)

-  Check the equality of covariance matrices for RATE="Low" and RATE="High"

install.packages( 'heplots ')

options(digits  =  4)

tear  <-  c (

6.5 ,  6.2 ,  5.8 ,  6.5 ,  6.5 ,  6.9 ,  7.2 ,  6.9 ,  6.1 ,  6.3 ,

6.7 ,  6.6 ,  7.2 ,  7.1 ,  6.8 ,  7.1 ,  7.0 ,  7.2 ,  7.5 ,  7.6

)

gloss  <-  c (

9.5 ,  9.9 ,  9.6 ,  9.6 ,  9.2 ,  9.1 ,  10.0 ,  9.9 ,  9.5 ,  9.4 ,

9.1 ,  9.3 ,  8.3 ,  8.4 ,  8.5 ,  9.2 ,  8.8 ,  9.7 ,  10.1 ,  9.2

)

opacity  <-  c (

4.4 ,  6.4 ,  3.0 ,  4.1 ,  0.8 ,  5.7 ,  2.0 ,  3.9 ,  1.9 ,  5.7 ,

2.8 ,  4.1 ,  3.8 ,  1.6 ,  3.4 ,  8.4 ,  5.2 ,  6.9 ,  2.7 ,  1.9

)

(X  <-  cbind(tear,  gloss,  opacity))

(rate  <-  factor(gl(2 ,10 ,length=nrow (X)),  labels=c ( "Low" ,  "High")))

(additive  <-  factor(gl(2 ,5 ,length=nrow (X)),  labels=c ( "Low" ,  "High")))

result  =  heplots ::boxM(lm(X~rate))

result$statistic

result$p.value

●  Report: Testing hypotheses H0 : the covariance matrix does not vary with the level of RATE v.s. H1 : otherwise, we carried on the Box’s M test and obtained 4.017 as the value of test statistic.  The corresponding p-value was 0.6743. So, at the .05 level, there was no strong statistical evidence against H0 , i.e., we did not reject H0  and believed that the covariance matrix does not vary with the level of RATE.