
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























Analysis of Variance III Bios 662
Michael G. Hudgens, Ph.D. [email protected] http://www.bios.unc.edu/∼mhudgens 2006-11-08 17:
Outline
Linear Regression Formulation
X 1 i =
1 if ith obs in group 1 −1 if ith obs in group K 0 ow
Xli =
1 if ith obs in group l −1 if ith obs in group K 0 ow
Equivalency
Yij = μ + αi + ij
Yi = α + β 1 X 1 i + β 2 X 2 i + · · · + βK− 1 XK− 1 ,i + i
α = μ; α 1 = β 1 ; α 2 = β 2 ; · · · ; αK− 1 = βK− 1
αK = −
l=
βl
ANOVA: Inference and Testing
L =
i=
ciμi
i ci^ = 0
Lˆ =
i=
ci Y¯i·
Lˆ − L √ M SE
i c^2 i /ni
∼ tN −K
ANOVA: Multiplicity Adjustments
In SAS, Proc GLM/ANOVA: means group/bon clm;
eg, multiplicity adjusted CIs for a family of contrasts of the form Lˆ ±
i
c^2 i /ni ×
(K − 1)FK− 1 ,N −K;1−α
ANOVA: Diagnostics
FM AX = s
(^2) max s^2 min
, C = s
(^2) max ∑ s^2 i tables given in Web appendix of text
ANOVA: Diagnostics
Modified Levene Test: SAS
proc anova; class group; model age=group; means group/hovtest=bf;
The ANOVA Procedure Brown and Forsythe’s Test for Homogeneity of age Variance ANOVA of Absolute Deviations from Group Medians Sum of Mean Source DF Squares Square F Value Pr > F group 3 0.8003 0.2668 0.19 0. Error 19 26.3125 1. Level of -------------age------------- group N Mean Std Dev active 6 10.1250000 1. eight 5 12.3500000 0. no 6 11.7083333 1. passive 6 11.3750000 1.
Modified Levene Test: R
Levene <- function(y, group) { group <- as.factor(group) # precautionary meds <- tapply(y, group, median) resp <- abs(y - meds[group]) anova(lm(resp ~ group))[1, 4:5] }
Levene(age,group) F value Pr(>F) group 0.1926 0.
ANOVA: Diagnostics for Normality
N CV N CV N CV 5 0.88 10 0.92 24 0. 6 0.89 12 0.93 30 0. 7 0.90 15 0.94 40 0. 8 0.91 20 0.95 50 0. 9 0.91 22 0.95 100 0.
ANOVA: Diagnostics for Normality
l
l l
l
l
l l l l
l
l
l
l
l
l
l
l l l
l
l
l
l
−2 −1 0 1 2
−^
−^
0
1
2
3
Normal Q−Q Plot
Theoretical Quantiles
Sample Quantiles
ANOVA: Diagnostics
Box-Cox Transformations
So that the magnitude of the error sum of squares does not depend on p, use:
Yp =
k 1 (Y p^ − 1) for p 6 = 0 k 2 log(Y ) for p = 0
where
k 2 =
i,j
Yij
1 /N and k 1 = 1 pk 2 p−^1