STAT 3690 Lecture 13
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
STAT 3690 Lecture 13
2022
Testing for equality of population means (one-way multivariate analysis of vari- ance (1-way MANOVA), J&W Sec. 6.4)
● Generalization of two-sample problem
- Model: m independent samples, where
* x11 , . . . , x1nl MVNp (μ1 , 5)
*
* xm1 , . . . , xmnm MVNp (μm , 5)
- Hypotheses H0 : μ 1 = . . . = μm v.s. H1 : otherwise
● Alternatively
- Model: m independent samples, where
* x11 , . . . , x1nl MVNp (μ + 丁1 , 5)
*
* xm1 , . . . , xmnm MVNp (μ + 丁m , 5)
' Identifiability: i 丁i = 0 otherwise there are infinitely many models that lead to the same
data-generating mechanism.
- Hypotheses H0 : 丁 1 = . . . = 丁m = 0 v.s. H1 : otherwise
● Alternatively
- Model: xij = μ + 丁i + Eij with Eij MVNp (0, 5)
* Identifiability: i 丁i = 0
- Hypotheses H0 : 丁 1 = . . . = 丁m = 0 v.s. H1 : otherwise
● Sample means and sample covariances
- Sample mean for the ith sample i = n xij
- Sample covariance for the ith sample si = (ni _ 1)_ 1
- Grand mean = i ni i / i ni = ij xij / i ni
- Sum of squares and cross products matrix (SSP)
* Within-group SSP
j (xij _ i )(xij _ i )T
ssPw = (ni _ 1)si = (xij _ i )(xij _ i )T
i ij
* Between-group SSP
ssPb = ni (i _ )(i _ )T
i
* Total (corrected) SSP
ssPcor =
(xij _ )(xij _ )T = ssPw + ssPb
ij
● Exercise: verify the decomposition ssPcor = ssPw + ssPb .
● MLE of (μ1 , . . . , μm , 5)
- Under H0
* i = for each i
* = ( i ni )_ 1 ssPcor
- Without H0
* i = i = n xij
* = ( i ni )_ 1 ssPw
● Likelihood ratio
λ = , det(de)) 、
i ni /2
Λ = λ2/ i ni
- Under H0 : Λ ~ Wilk’s lambda distribution Λ(5, i ni _ m, m _ 1)
* Since ssPw ~ Wp (5 , i ni _ m) and ssPb ~ Wp (5, m _ 1)
* When i ni _ m is large (i.e., (p + m)/2 _ i ni + 1 《 0), Bartlett’s approximation
{(p + m)/2 _ ni + 1} ln Λ s χ2 (p(m _ 1))
i
● Rejection region at level α
←x11 , . . . , x1nl , x21 , . . . , xmnm : {(p + m)/2 _ ni + 1} ln Λ 2 χ1(2) _α,p(m _ 1) 、
i
= ,x11 , . . . , x1nl , x21 , . . . , xmnm : Λ 5 exp ← 、、
● p-value
┌ ┐
● Exercise: factors in producing plastic film
- W. J. Krzanowski (1988) P」之》d之μi人μ О户 wai扌之U↓」之↓扌人 A》↓i夕μ之μ . A User’s Perspective. Oxford UP, pp. 381.
- Three response variables (tear, gloss and opacity) describing measured characteristics of the resultant film
- A total of 20 runs
- One factor RATE (rate of extrusion, 2-level, low or high) in the production test
options(digits = 4)
install.packages( !car !)
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")))
# Bartlett 's approximation to Wilks lambda distribution
X_low <- X[rate == !Low!,]
X_high <- X[rate == !High!,]
n <- nrow (X); p <- ncol (X); m <- 2
SSPcor = (n-1)*cov (X)
SSPw <- (nrow (X_low) - 1)*cov (X_low) + (nrow (X_high) - 1)*cov (X_high)
(Lambda <- det (SSPw)/det(SSPcor))
(cri.point = exp (qchisq(0.95, p*(m-1))/((p+m)/2-n+ 1)))
Lambda <= cri.point
(p.val = 1-pchisq(((p+m)/2-n+ 1)*log(Lambda), p* (m-1)))
# Rao 's approximation to Wilks lambda distribution
summary (manova (X ~ rate), test = !Wilks !)
summary (car ::Manova(lm(X ~ rate)), test.statistic= !Wilks !)
● Report: Testing hypotheses H0 : no RATE effect on film characteristics v.s. H1 : otherwise, we carried on the Wilk’s lambda test and obtained 0.4136 as the value of test statistic. The corresponding p-value (resp. rejection region) was 0.002227 (resp. (_o, 0.6227]). So, at the .05 level, there was statistical evidence against H0 , i.e., we rejected H0 and believed that there was an effect from RATE on film characteristics.
2022-03-18