Oneway Classification

advertisement
Oneway Classification
One Treatment (Factor) in a CRD; may be unequal replications
yij = µ + αi + ij
i = 1, 2, . . . , t,
| {z }
µi
j = 1, . . . , ni ,
ij ∼ iid N (0, σ 2 )
equivalent to assuming yij ∼ N (µi , σ 2 ), j = 1, . . . , ni for each treatment i.
Also involves the assumption of homogeneity of variance i.e., same variance
in each population.
Estimation
P
µ̂i = ȳi . = (
yij )/ni , i = 1, . . . , t
(yij − ȳi. )2
P
σ̂ 2 = s2 = i j
, N = i ni
N −t
αp d
− αq = ȳp. − ȳq. , p 6= q
s
1
1
+
SE(ȳp. − ȳq. ) = sd = s
np nq
j
P P
A (1 − α)100% C.I. for αp − αq (or µp − µq .) is
(ȳp. − ȳq. ) ± tα/2,ν · sd
where
tα/2,ν = upper α/2 percentage point of the t-distribution with ν d.f.
ν = N −t
Testing Hypotheses
AoV Table
SV
Trt
Error
Total
d.f.
SS
t−1
N −t
N −1
MS
MSTrt
MSE(= s2 )
F
Fc = MSTrt /MSE
p-value
P r(F > Fc )
The F-statistic tests
H0 : µ1 = µ2 = · · · µt vs. Ha : at least one ineq.
or equivalently
H0 : α1 = α2 = · · · = αt vs. Ha : at least one ineq.
Testing H0 : µp = µq
vs. Ha : µp 6= µq or equivalently
vs. Ha : αp 6= αq
H0 : αp = αq
Use the t-statistic
|ȳp . − ȳq .|
sd
iff tc > tα/2,ν ν = N − t
tc =
Rej. H0
Contrasts (or Comparisons)
P
ai µi is said to be a contrast or comparison of means µ1 , µ2 , . . . , µt if
P
a1 , a2 , . . . , at are constants such that i ai = 0.
i
Examples:µ1 − µ2 , 2µ1 − µ2 − µ3 , µ1 − 31 µ2 − 31 µ4 − 13 µ5
An estimate of a linear contrast of the means is given by the linear
P
P
contrast of the sample means i ai ȳi. where ai = 0.
Test for Preplanned (or a priori) Comparisons
(Equal Sample Size Case i.e., n1 = n2 = · · · = n)
P
P
H0 : i ai µi = 0 vs. Ha : i ai µi 6= 0 are:
A t-test using the statistic tc =
|
P
i ai ȳi .|
P
2
ai
n
s(
1
Rej. H0 : if tc > tα/2,N −t
)2
or
P
An F-test using the statistic Fc =
n(
ai ȳi. )2 /(
s2
P 2
a)
i
Rej. H0 : if Fc > Fα,1,N −t
Pairwise Comparison of Means
Individual Comparisons:
* By the t-test of H0 : µp = µq
* By the C.I.’s for µp − µq
* Equivalently, using the Least Significance Difference (LSD) when sample sizes are equal.
t-test for H0 : µp − µq = 0 gives Rej: H0 if
|ȳp . − ȳq .| > tα/2,ν · s ·
|
{z
q
LSDα
2/n ,
n = sample size, ν = N − t
}
Multiple Comparisons:
* Tukey’s procedure for all possible pairwise comparisons simultaneously
(HSD).
* Bonferroni conservative procedure for several comparisons (pairwise
P
and/or contrasts of the type ai µi ) simultaneously.
Oneway Analysis of Covariance
One factor experiment in a CRD; a single covariate is also measured. Assume
equal replication.
i = 1, . . . , t
∼ iid N (0, σ 2 )
j = 1, . . . , n ij
yij = µ + τi + β(xij − x̄.. ) + ij
⇐⇒ Assuming straight line regressions for each treatment with the same slope β
Treatment 1:
Treatment 2:
y1j = α1 + βx1j + 1j
y2j = α2 + βx2j + 2j
..
.
Treatment t:
ytj = αt + βxtj + tj
, j = 1, . . . , n
, j = 1, . . . , n
..
.
,
j = 1, . . . , n
where αi = µ + τi − x̄..
Estimation
µ̂i = ȳi. (Adj.) = ȳi − b(x̄i. − x̄.. ) ‘Adjusted Treatment Means’
Sxy
b=
Sxx
P
ȳi. =
yij
n
j
σ̂ 2 = s2
Sxy =
P P
Sxx =
P P
i
j (xij
i
P
x̄i. =
j (xij
− x̄i. )(yij − ȳi. )
− x̄i. )2
xij
n
j
P P
x̄.. =
i
j
xij
nt
MS Error from the ‘Adjusted AoV’
A (1 − α) 100% C.I. for µp − µq is
(ȳp. (Adj.) − ȳq. (Adj.)) ± tα/2,ν · sd
where
2 (x̄p. − x̄q. ) 2
+
sd = s
n
Exx
(
and
ν = t(n − 1) − 1
)1/2
Testing Hypotheses
An analysis of covariance table
SV
df
Trt
t−1
Error(Unadj.) t(n − 1)
Regression
1
Error(Adj.) t(n − 1) − 1
Total
tn − 1
Trt(Adj.)
t−1
Error(Adj.) t(n − 1) − 1
SS
MS
SSTrt
MSTrt
SSEUnadj. MSEUnadj.
SSReg
MSReg
SSE
MSE(= s2 )
SSTot
SSTrt
MSTrt
SSE
MSE(= s2 )
F
MSTrt /MSEUnadj.
MSReg /MSE
MSTrt /MSE
The F -statistic for Trt tests the hypothesis
H0 : µ1 = µ2 = · · · = µt versus Ha : at least one inequality
when the covariate is not present in the model. The F -statistic for Regression
tests the hypothesis
H0 : β = 0 versus Ha : β 6= 0
The F -statistic for Trt(Adj.) tests the hypothesis
H0 : τ1 = τ2 = · · · = τt versus Ha : at least one inequality
when β is not zero. This test is equivalent to comparing the intercepts of the
regression lines i.e.,
H0 : α1 = α2 = · · · = αt versus Ha : at least one inequality
If this hypothesis is rejected, then at least one pair of treatment effects (equivalently, adjusted treatment means) is different.
A Twoway Factorial in a CRD
Two Crossed Factors A, B in a completely randomized design is another
example of a twoway classification.
Model: yijk = µ + αi + βj + γij +ijk
|
{z
i = 1, . . . , a (Factor A)
}
µij
j = 1, . . . , b (Factor B)
k = 1, . . . , n (Replication)
ijk ∼ iid N (0, σ 2 )
µij = Expected mean in the ij th cell of the two classification.
Levels of Factor B
1
2
.
Levels of ..
Factor A i
..
.
a
1
µ11
µ21
..
.
2
µ12
µ22
···
···
j
···
···
b
µ1b
µ2b
..
.
µij
..
.
µa1
µ̄.1
..
.
µa2
µ.2
···
···
µ̄.j
···
···
µab
µ̄.b
µ̄1.
µ̄2.
..
.
µ̄i.
..
.
µ̄a.
Figure 1: Means model: Cell means and marginal means
Estimation
X
µ̂ij = ȳij. = (
yijk )/n
k
XX
µ̄ˆi. = ȳi.. = (
j
yijk )/nb
k
XX
µ̄ˆ.j = ȳ.j. = (
i
yijk )/na
k
σ̂ 2 = s2 = MSE
q
SE (ȳi.. − ȳi0 .. ) = s 2/bn
q
SE (ȳ.j. − ȳ.j 0 . ) = s 2/an
A (1-α)100% CI for Treatment Mean Differences.
µ̄i. − µ̄i0 . : (ȳi.. − ȳi0 .. ) ± tα/2,ν · s ·
µ̄.j − µ̄.j 0 : (ȳ.j. − ȳ.j 0 . ± tα/2,ν · s ·
q
2/nb
q
2/na
ν = d.f. for MSE i.e.,ν = ab(n − 1)
q
SE(ȳij. − ȳij0 . ) = s 2/n
A (1 − α)100% CI for cell mean diferences
q
µij − µij 0 : (ȳij. − ȳij 0 . ) ± tα/2,ν · s 2/n
q
SE(ȳij. − ȳi0 j. ) = s 2/n
A (1 − α)100% CI for cell mean differences
q
µij − µi0 j : (ȳij. − ȳi0 j. ) ± tα/2,ν · s 2/n
Hypotheses Testing
AoV Table
SV
Treatment
A
B
A*B
Error
Total
d.f.
SS MS
ab-1
a-1
MSA
b-1
MSB
(a-1)(b-1)
MSAB
ab(n-1)
MSE
abn-1
F
MSA /MSE
MSB /MSE
MSAB /MSE
(1)
(2)
(3)
F-tests
(1) Tests H0 : µ̄1. = µ̄2. = · · · = µ̄a. vs. Ha : at least one ineq.
(2) Tests H0 : µ̄.1 = µ̄.2 = · · · = µ̄.b vs. Ha : at least one ineq.
(3) Tests H0 : (µij − µ̄i. − µ̄.j + µ̄.. ) = 0 for all (i, j)
⇔ H0 : no interaction
Depending on whether the test for interaction is significant or not, we can
test hypotheses like
H0 : µ̄i. = µ̄i0 .
vs.
Ha : µ̄i. 6= µ̄i0 .
H0 : µ̄j = µ̄.j 0
vs.
Ha : µ̄.j 6= µ̄.j 0
H0 : µi = µij 0
vs.
Ha : µij 6= µij 0
H0 : µij = µi0 j
vs.
Ha : µij 6= µi0 j
or test any preplanned comparisons among the factor A means and/or factor
B means.
Oneway Random Model
Here we consider an experiment with one random factor.
Model:
The general model is given by
yij = µ + Ai + ij
i = 1, . . . , a
j = 1, . . . , n
where the random effects Ai , i = 1, . . . , a are assumed to be distributed
independently as N (0, σa2 ) random variables independently of the random
errors ij . As usual, the ij i = 1, . . . , a; j = 1, . . . , n are assumed to be
distributed independently as N (0, σ 2 ) random variables.
Hypothesis Testing:
SV
A
Error
Total
d.f.
SS
a−1
SSA
a(n − 1) SSE
an − 1
AoV Table
MS
F
M SA
M SA /M SE
M SE(= s2 )
E(MS)
σ 2 + n σa2
σ2
The F-statistic from the analysis of variance table is used to test the hypothesis H0 : σa2 = 0 vs. Ha : σa2 > 0
Estimation:
As usual we estimate the error variance by the MSE
σ̂ 2 = s2
If the hypothesis H0 : σa2 = 0 is rejected in favor of Ha : σa2 > 0 we may also
estimate σa2 .
To do this equate the observed mean squares M SA to its Expected Value
(which is an algebraic expression):
σ 2 + n σa2 = M SA ,
and solve for σa2 which gives the result
M SA − σ̂ 2
n
where the right hand side consists only of numbers computed and are obtained from the Anova table. This method of estimation is called the method
of moments.
σ̂a2 =
Download