0% found this document useful (0 votes)
58 views29 pages

Lecture 3: Transformations, Non-Parametric Tests and Multiple Comparisons

This document summarizes key concepts from Lecture 3, including: 1) Variance-stabilizing transformations can be used if Levene's test finds unequal variances, such as square root for Poisson data and arcsine for binomial data. Transformations are done in SAS or R. 2) Box-Cox transformations simultaneously estimate the best transformation parameter lambda and model parameters to stabilize variances when groups differ. The transformation is a function of lambda and the geometric mean. 3) Common Box-Cox transformations include logarithm (lambda = 0), square root (lambda = 0.5), and squared (lambda = 2) which are easier to explain than other lambda values.

Uploaded by

dan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views29 pages

Lecture 3: Transformations, Non-Parametric Tests and Multiple Comparisons

This document summarizes key concepts from Lecture 3, including: 1) Variance-stabilizing transformations can be used if Levene's test finds unequal variances, such as square root for Poisson data and arcsine for binomial data. Transformations are done in SAS or R. 2) Box-Cox transformations simultaneously estimate the best transformation parameter lambda and model parameters to stabilize variances when groups differ. The transformation is a function of lambda and the geometric mean. 3) Common Box-Cox transformations include logarithm (lambda = 0), square root (lambda = 0.5), and squared (lambda = 2) which are easier to explain than other lambda values.

Uploaded by

dan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture 3: Transformations, Non–Parametric Tests

and Multiple Comparisons


Reference: Montgomery Sections 3.5, 3.11, 15.1
Reference: Dean and Voss Chapters 4, 5

Variance-stabilising transformations

If Levene’s test is significant then it is sometimes possible to transform the data


to have constant variance. Sometimes these transformations are indicated by the
distribution. For instance for a Poisson distribution the square root transformation
stabilises the variance and for the binomial distribution the arcsin transformation,
x = arcsin(y) stabilises the variance. Often the transformation is a power transfor-
mation and it is determined empirically based on the data, although care must be
taken to ensure that the transformation makes sense in the context of the experiment
(for instance, what happens when x becomes very large?).
To make transformations in SAS we use a DATA step. In R, we use the command
newvar <- functions(oldvar) where functions refers to any mathematical functions
that are defined in R, for instance newvar<-log(oldvar) to transform using the (nat-
ural) logarithm transformation.

EXAMPLE 1.
Recall that we had a problem with the variance data in the watershed data. If we
take the square root of the response variable, then we can overcome this problem.
We find that the residuals are now normally distributed with constant variance.
libname lect ’/courses/da9372e5ba27fe300/35356’;

data watershed;
set watershed;
sqrtvol=Sqrt(volume);
run;

Written by Debbie Street, 35356: Lecture 3 1


modified by Steve Bush
W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 3 0

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : s q r tv o l

S u m o f
S o u r c e D F S q u a r e s M e a n S q u a r e F V a lu e P r > F
M o d e l 3 3 2 .6 8 4 2 1 2 6 7 1 0 .8 9 4 7 3 7 5 6 8 1 .0 5 < .0 0 0 1

E r r o r 2 0 2 .6 8 8 4 3 2 8 0 0 .1 3 4 4 2 1 6 4

C o r r e c te d T o ta l 2 3 3 5 .3 7 2 6 4 5 4 7

R -S q u a r e C o e ff V a r R o o t M S E sq r tv o l M e a n
0 .9 2 3 9 9 7 1 6 .3 6 1 2 1 0 .3 6 6 6 3 6 2 .2 4 0 8 8 3

S o u r c e D F T y p e I S S M e a n S q u a r e F V a lu e P r > F
m e th o d 3 3 2 .6 8 4 2 1 2 6 7 1 0 .8 9 4 7 3 7 5 6 8 1 .0 5 < .0 0 0 1

S o u r c e D F T y p e III S S M e a n S q u a r e F V a lu e P r > F
m e th o d 3 3 2 .6 8 4 2 1 2 6 7 1 0 . 8 9 4 7 3 7 5 6 W e d n 8 e 1s d . 0a y 5 , F e < b .r 0 u 0 a r 0 y 1 1 2 , 2 0 1 4 1 2 : 0 2 : 4 8 P M 3 1

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : s q r tv o l

Written by Debbie Street, 35356: Lecture 3 2


modified by Steve Bush
C o e f f V a r ia t io n . S td E r r o r M e a n 0 .0 6 9 7 8 7 8 9

B a s ic S t a t is t ic a l M e a s u r e s
L o c a t io n V a r ia b ilit y
M e a n 0 .0 0 0 0 0 S t d D e v ia t io n 0 .3 4 1 8 9

M e d ia n 0 .0 2 3 2 7 V a r ia n c e 0 .1 1 6 8 9

M o d e - 0 .4 1 1 0 1 R a n g e 1 .1 9 3 5 0
W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 3 3
I n t e r q u a r t ile R a n g e 0 .6 3 3 2 3
T h e G L M P ro c e d u re

L e v e n e ' s T e T s t e f s o t s r f H o r o m L o c g a e t n i o e ni t :y M o f u s 0 q = r 0t v o l V a r ia n c e
A N O V A o f S q u a r e d D e v ia t io n s f r o m G r o u p M e a n s
T e st S t a t is t ic p V a lu e
S u m o f M e a n
S o u r c e S t u d e n t ' sD t F St q u a r e s S 0 q u P a r r e > | t | F V a 1l u . 0 e 0 0 0 P r > F

m e th o d S i g n 3 M 0 .0 1 4 3 0 0 . 0 0 P 4 r 7 8> = | M | 0 1. 3 . 06 0 0 0 0 .7 8 5 8

E r r o r S ig n e d R a 2n 0 k S 0 . 2 6 9 1 - 4 0 . 0 P 1 r 3 5> = | S | 0 .9 1 1 9

T e s t s f o r N o r m a lit y
T e st S t a t is t ic p V a lu e
S h a p ir o - W ilk W 0 .9 5 8 7 6 6 P r < W 0 .4 1 4 1

K o lm o g o r o v - S m ir n o v D 0 .1 2 7 2 5 5 P r > D > 0 .1 5 0 0

C r a m e r - v o n M is e s W -S q 0 .0 5 3 3 6 5 P r > W -S q > 0 .2 5 0 0

A n d e r s o n - D a r lin g A -S q 0 .3 5 9 5 P r > A -S q > 0 .2 5 0 0

Box–Cox Transformations

One approach to dealing with data that do not satisfy the assumptions of ANOVA
is to perform a transformation. In practice, data are often transformed using a
log transformation or a square root transformation to stabilise the variances of the
response in each of the treatment groups when they differ significantly. These two
transformations are in fact special cases of the Box–Cox transformation.
In a Box–Cox transformation, we simultaneously estimate the best transformation
and the usual model parameters. We do this by estimating an additional parameter
λ and analysing the responses

yλ − 1
#!λ−1 for λ 6= 0;



 " N

 X
 λ exp ln(yi )/N



(λ) i=1
y =



 " N #

 X
exp yi /N × ln(y) for λ = 0.



i=1

The benefit of this transformation over a standard power transformation (y ∗ = y λ ) is


that the sums of squares is comparable across different values for y (λ) , where they are
not hfor y ∗ . This is iachieved by scaling by the geometric mean of the observations,
PN λ
exp i=1 ln(yi )/N . In addition, as λ tends to 0, the term (y − 1)/λ tends to
ln(y).
While in practice, it is possible to transform with any value of λ, it is often easier
to use easily explainable transformations such as λ = −1, 0, 0.5, 2.

Written by Debbie Street, 35356: Lecture 3 3


modified by Steve Bush
EXAMPLE 2.
Consider the watershed data again. In the previous example we chose to take the
square root transformation, probably after a deal of trial and error. If we were not
sure about an appropriate transformation, we could use a Box–Cox transformation.
To do this, we would use the command
proc transreg data=lect.watershed details ss2;
model BoxCox(volume) = identity(method);
run;
We obtain the following output W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 3 7

T h e T R A N S R E G P ro c e d u re

D e p e n d e n t V a r ia b le B o x C o x (v o lu m e )

N u m b e r o f O b s e r v a t io n s R e a d 2 4

N u m b e r o f O b s e r v a t io n s U s e d 2 4

Written by Debbie Street, 35356: Lecture 3 4


modified by Steve Bush
W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 3 8
W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 3 8
T h e T R A N S R E G P ro c e d u re
T h e T R A N S R E G P ro c e d u re
M o d e l S ta te m e n t S p e c if ic a t io n D e t a ils
M o d e l S ta te m e n t S p e c if ic a t io n D e t a ils
T y p e D F V a r ia b le D e s c r ip t io n V a lu e
T y p e D F V a r ia b le D e s c r ip t io n V a lu e
D e p 1 B o x C o x (v o lu m e ) L a m b d a U se d 0 .5
D e p 1 B o x C o x (v o lu m e ) L a m b d a U se d 0 .5
L a m b d a 0 .5
L a m b d a 0 .5
L o g L ik e lih o o d - 6 .4 2 6 9
L o g L ik e lih o o d - 6 .4 2 6 9
C o n v . L a m b d a 0 .5
C o n v . L a m b d a 0 .5
C o n v . L a m b d a L L - 6 .4 2 6 9
C o n v . L a m b d a L L - 6 .4 2 6 9
C I L im it - 8 .3 4 7 6
C I L im it - 8 .3 4 7 6
A lp h a 0 .0 5
A lp h a 0 .0 5
In d 1 Id e n tity (m e th o d ) D F 1
In d 1 Id e n tity (m e th o d ) D F 1

T h e T R A N S R E G P r o c e d u r e H y p o th e s is T e s ts fo r B o x C o x (v o lu m e )
T h e T R A N S R E G P r o c e d u r e H y p o th e s is T e s ts fo r B o x C o x (v o lu m e )
U n iv a r ia t e A N O V A T a b le B a s e d o n t h e U su a l D e g r e e s o f
U n i v a r i a t e A N O V A T a b F l e r eB e a d s o e m d o n t h e U su a l D e g r e e s o f
F r e e d o m
S u m o f M e a n
S o u r c e D F S S q u u m a r eo s f S qM u e a a r ne F V a lu e L ib e r a l p
S o u r c e D F S q u a r e s S q u a r e F V a lu e L ib e r a l p
M o d e l 1 1 3 0 .0 8 0 7 1 3 0 .0 8 0 7 2 5 0 .8 2 > = < .0 0 0 1
M o d e l 1 1 3 0 .0 8 0 7 1 3 0 .0 8 0 7 2 5 0 .8 2 > = < .0 0 0 1
E r r o r 2 2 1 1 .4 0 9 9 0 .5 1 8 6
E r r o r 2 2 1 1 .4 0 9 9 0 .5 1 8 6
C o r r e c t e d T o t a l 2 3 1 4 1 .4 9 0 6
C o r r e c t e d T o t a l 2 3 1 4 1 .4 9 0 6
T h e a b o v e s t a t is t ic s a r e n o t a d j u s t e d f o r t h e fa c t th a t th e
d T e h p e e a n b d o e v n e t s v t a a r t i i a s bt i lc e s w a r a e s n t r o a t n a s d f o j u r m s t e e d d f a o n r d t h s o e a f a r ec t g t e h n a e t r t a h l l e y
ld i b e e p r e a n l .d e n t v a r i a b l e w a s t r a n s f o r m e d a n d s o a r e g e n e r a lly
lib e r a l.

R o o t M S E 0 .7 2 0 1 6 R -S q u a r e 0 .9 1 9 4
R o o t M S E 0 .7 2 0 1 6 R -S q u a r e 0 .9 1 9 4
D e p e n d e n t M e a n 2 .4 8 1 7 7 A d j R -S q 0 .9 1 5 7
D e p e n d e n t M e a n 2 .4 8 1 7 7 A d j R -S q 0 .9 1 5 7
C o e ff V a r 2 9 .0 1 8 0 8 L a m b d a 0 .5 0 0 0
C o e ff V a r 2 9 .0 1 8 0 8 L a m b d a 0 W. 5 0e d0 n0 e s d a y , F e b r u a r y 1 2 , 2 0 1 4 1 2 : 0 2 : 4 8 P M 3 9

T h e T R A N S R E G P ro c e d u re

U n iv a r ia t e R e g r e s s io n T a b le B a s e d o n t h e U s u a l D e g r e e s o f F r e e d o m
T y p e II
S u m o f M e a n
V a r ia b le D F C o e f f ic ie n t S q u a r e s S q u a r e F V a lu e L ib e r a l p
In te r c e p t 1 - 2 .7 2 4 0 1 3 8 2 9 .6 8 1 2 9 .6 8 1 5 7 .2 3 > = < .0 0 0 1

I d e n t it y ( m e t h o d ) 1 2 .0 8 2 3 1 1 9 1 3 0 .0 8 1 1 3 0 .0 8 1 2 5 0 .8 2 > = < .0 0 0 1

T h e a b o v e s ta tis tic s a r e n o t a d ju s te d fo r th e fa c t th a t th e d e p e n d e n t v a r ia b le w a s tr a n s fo r m e d a n d s o a r e g e n e r a lly


lib e r a l.

Written by Debbie Street, 35356: Lecture 3 5


modified by Steve Bush
Non–Parametric Tests

Earlier, we discussed the assumptions that we make when performing an analysis


of variance. A sensible question to ask is “What happens if our assumptions fail?”
Earlier we considered variance stabilising transformations, but they don’t always
work, and even if they do the resulting model might not be sensible. In these cases
we need a more robust test, one which does not require as many assumptions on
the distribution of the data. If a test makes no such assumptions we call the test
distribution free, or nonparametric.
The appropriate nonparametric alternative to a one–way ANOVA is the Kruskal–
Wallis test. The hypotheses for this test are

H0 : All of the a population distributions are the same


H1 : The a population distributions are not all the same.

In this test, we assign ranks to the observations, and compare the observed ranks
that appear in each group to the expected ranks if the null hypothesis were true.
More formally, suppose that the ith set of observations have cumulative distribution
function Fi (x), and we assume independence across and within samples. Then we
can express our hypotheses as

H0 : F1 (x) = F2 (x) = . . . = Fa (x)


H1 : Not all Fi (x) are the same.

Under the null hypothesis, we have n × a observations from one population, so we


can assign ranks

Ri = sum of ranks for ith treatment group


a
X N (N + 1)
Ri =
i=1
2
n N (N + 1) n(N + 1)
E(Ri ) = × =
N 2 2
The test statistic is based on (Ri − E(Ri ))2 and is
a  2
12 X n(N + 1)
H= ri −
N (N + 1) i=1 2

We can show that H is asymptotically χ21 .


While the Kruskal–Wallis test is more robust to failures in the assumptions of nor-
mality and constant variance, it is less likely that this test will detect differences
if they exist. The Kruskal–Wallis test makes some assumptions on the distribution

Written by Debbie Street, 35356: Lecture 3 6


modified by Steve Bush
of the test statistic. If the sample size in each group is small (less than 5), then
these assumptions are not reasonable. In this case, you should use tables of exact
p–values, such as those found in Lı̄dums [2002].
Conover [1999] demonstrated that the outcome of the Kruskal–Wallis test is equiva-
lent to the outcome of a one–way ANOVA performed on the ranks of the observation
(rather than the observations themselves). The author also demonstrates that, when
we have only two groups, the Mann–Whitney test (the nonparametric alternative
to the 2–sample t–test) is equivalent to a 2–sample t–test on the ranks.
In SAS, we use the NPAR1WAY procedure, and in R we use the commands
kruskal.test(response,tmt,data=dataset)
where response contains the responses for the observations and tmt contains the
level for the treatment factor for each observation. dataset contains the data.

EXAMPLE 3.
Suppose that instead of performing a variance stabilising transformation for the
watershed data, we perform the Kruskal–Wallis test. To do this in SAS, we use the
PROC NPAR1WAY
proc npar1way data=lect.watershed wilcoxon;
var volume;
class method;
run;
We obtain the following output from SAS.
W e d n e s d a y , F e b ru a ry 1 2 , 2 0 1 4 1 2 :0 2 :4 8 P M 4 0

T h e N P A R 1 W A Y P ro c e d u re

W ilc o x o n S c o r e s ( R a n k S u m s ) f o r V a r ia b le v o lu m e
C la s s if ie d b y V a r ia b le m e t h o d
S u m o f E x p e c te d S td D e v M e a n
m e th o d N S c o r e s U n d e r H 0 U n d e r H 0 S c o r e
1 6 2 3 .0 7 5 .0 1 4 .9 9 6 7 3 9 3 .8 3 3 3 3 3

2 6 5 5 .0 7 5 .0 1 4 .9 9 6 7 3 9 9 .1 6 6 6 6 7

3 6 9 3 .0 7 5 .0 1 4 .9 9 6 7 3 9 1 5 .5 0 0 0 0 0

4 6 1 2 9 .0 7 5 .0 1 4 .9 9 6 7 3 9 2 1 .5 0 0 0 0 0

A v e r a g e s c o r e s w e r e u s e d f o r t ie s .

K r u s k a l- W a llis T e s t
C h i- S q u a r e 2 1 .1 5 5 9

D F 3

P r > C h i- S q u a r e < .0 0 0 1

Written by Debbie Street, 35356: Lecture 3 7


modified by Steve Bush
Multiple Comparisons
Having conducted an experiment and analysed the results we can either decide that
the treatments tested have essentially the same effect or we can decide that the
treatments have significantly different effects.
In the first case the treatment used in future can be decided on the basis of cost or
convenience but in the case that the results are significantly different we might want
to be able to classify treatments into groups of treatments that are not significantly
different. The situation is not dissimilar to the answer given to an old woman who
wanted to take her turtle on the train and wanted to know how much a ticket for
the turtle would be. She was told
Cats is dogs and dogs is dogs
And squirrels in cages is parrots
But this here turtle is a hinsect
And we won’t charge you nuffin for it
The approach we take to identifying sets of equivalent treatments depends in part
on the treatments used.

Contrasts

One approach is to test specific linear combinations of means and ask if that linear
combination is 0.
P
A linear function of the µPi , i λi µi , say, is said to bePestimable if P
there is a linear
combination of the yij s, ij aij yij , say, such that E( ij aij yij ) = i λi µi . So any
function of the treatment means is estimable. But in the effects model the parameter
µ is not estimable, for example.
P P
A contrast is a function i λi µi where i λi = 0.
P P
Any contrast of the responses is estimable since E( ij λi yij ) = i λi µi , for example.
In the effects model any contrast of the τi is estimable since the coefficients of µ sum
to 0.
P
We can test the hypothesis H0 : i λi µi = 0 using either a t-test or an F test. We
know that the treatment average, y i. , is the estimate of the treatment mean, µi , with
the smallest variance. To get the relevant test statistic, Pwe write the contrast we
want to test in terms of the treatment averages to get i λi y i. . This has a normal
2
distribution with mean i λi µi and variance i λ2i σni . If the null hypothesis is true,
P P

then normalising this ratio, and using the EMS to estimate the unknown σ 2 , we

Written by Debbie Street, 35356: Lecture 3 8


modified by Steve Bush
get P
λi y i.
tobs = qPi ,
2 EMS
λ
i i ni

which is distributed as a t random variable with degrees of freedom equal to the


degrees of freedom for the EMS.
Since the square of a random variable with a t distribution is a random variable
with an F distribution, you can square tobs to get Fobs if you prefer.
We call
( i λi y i. )2
P
P 2
i (λi /ni )
the contrast sum of squares.
The confidence interval for a contrast can be calculated directly from the distribu-
tional information given above.
P
Two contrasts are said to be orthogonal if i λi νi /ni = 0. Sums of squares,
and hence tests of hypotheses, corresponding to orthogonal contrasts are indepen-
dent.
Since there are a − 1 degrees of freedom associated with the Treatment sum of
squares, we can find a − 1 independent orthogonal contrasts.

Written by Debbie Street, 35356: Lecture 3 9


modified by Steve Bush
Scheffe’s test gives us a way of finding one contrast whose sum of squares is exactly
equal to the treatment sum of squares for the corresponding ANOVA table, and it
provides a method to test contrasts that are not independent with a significance
level of at most α for any of the comparisons.
Because the contrasts need not be independent and because there may be more
contrasts than degrees of freedom available, reject H0 if
q
tobs > (a − 1)Fa−1,N −a,α .

The same critical value is used to construct simultaneous confidence intervals.

Written by Debbie Street, 35356: Lecture 3 10


modified by Steve Bush
Pairs of Means

If we are only interested in comparing pairs of means then we can get tests that are
more powerful than Scheffe’s test.

Fisher’s Least Significance Difference (LSD) Method

This is just a set of pairwise t-tests comparing all possible pairs of means. The error
rate, α, is a per comparison error rate and so the probability that at least one value
will be declared significant is very high for even small values of a. Some statisticians
‘protect” themselves against this by only performing the LSD if the associated F
test is significant.

Tukey’s HSD Test

Another way to overcame the significance level problem is to use Tukey’s honestly
significant difference procedure which is based on the studentised range. This range
is given by
y max − y min
q= p ,
EMS/n
where y max and y min are the smallest and largest sample means and we assume that
ni = n∀i. Tabulated values of qa,N −a,α exist.
Tukey’s test declares that two means are significantly different if the absolute value
of their sample difference exceeds
r
EMS
qa,N −a,α
n
The error rate is for the full set of comparisons.

Hsu’s MCB Test - Comparing Treatment Means to the Best Mean

Hsu’s multiple comparison with the best treatment method provides a confidence
interval for the difference between each level mean and the best of the other level
means. Users need to identify what is meant by ‘best’, that is, is larger better?
or smaller? or closer to a particular value? Then this method constructs k − 1
comparisons comparing each of the remaining groups to the group identified as
best. The family error rate for these tests is α.

Written by Debbie Street, 35356: Lecture 3 11


modified by Steve Bush
Dunnett’s Test - Comparing Treatment Means with a Control

This test is a modification of the usual t test, and is used to compare all of the
treatments to a control treatment. It is only appropriate when one of the treatments
is a control treatment and the purpose of the experiment is to compare each of the
treatments with the control. The t test is modified by using a different critical value
and tables of these values are available. The family error rate for these tests is
α.
Which multiple comparison test to use depends on the desired inference. It is in-
efficient to use the Tukey all-pairwise approach when Dunnett or Hsu’s MCB is
suitable, because the Tukey confidence intervals will be wider and the hypothesis
tests less powerful for a given family error rate. For the same reasons, Hsu’s MCB
is superior to Dunnett if you want to eliminate levels that are not the best and to
identify those that are best or close to the best. The choice of Tukey versus Fisher
depends on which error rate, family or individual, you wish to specify.
To obtain pairwise comparisons in Minitab we select Stat > ANOVA > One-way,
and select the Comparisons option.

EXAMPLE 4.
The data below are reported in Cochran and Cox (1957) and show the results of
an experiment on the effects of applications of sulphur in reducing scab disease in
potatoes. The object in applying sulphur is to increase the acidity of the soil since
scab does not thrive in very acid soil. In addition to untreated plots, which serve as
a control, three amounts of dressing were applied - 300, 600 and 1200 pounds per
acre. Both a fall and a spring application of each amount was tested, so that in all
there were 7 distinct treatments. The sulphur was spread by hand on the surface of
the soil and then disced to a depth of about 4 inches. The quantity to be analysed
is the ”scab index”. This is, roughly speaking, the percentage of the surface area
of the potato that is infected with scab. It is obtained by examining 100 potatoes
at random from each plot, grading each potato on a scale from 0 to 100% infected,
and taking the average.

Written by Debbie Street, 35356: Lecture 3 12


modified by Steve Bush
Group Observations
Control 12 10 24 29 30 18 32 26
Spring 300 30 7 21 9
Spring 600 18 24 12 19
Spring 1200 17 7 16 17
Autumn 300 9 9 16 4
Autumn 600 16 10 18 18
Autumn 1200 10 4 4 5

Table 1: Potato scab data


T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1

S c a tte r p lo t o f P o ta to S c a b D a ta
sc a b
4 0

3 0

2 0

1 0

0
A 1 2 0 0 A 3 0 0 A 6 0 0 C o n tro l S 1 2 0 0 S 3 0 0 S 6 0 0

tre a tm e n t

title "Scatterplot of Potato Scab Data";


proc gplot data=lect.potato;
plot scab*treatment;
symbol1 value=dot;
run;

Written by Debbie Street, 35356: Lecture 3 13


modified by Steve Bush
proc glm data=lect.potato plots=diagnostics;
class treatment;
model scab=treatment;
means treatment /hovtest=levene cldiff lines dunnett(’Control’) tukey lsd scheffe;
output out=potato residual=resi;
run;
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 3

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : s c a b

S u m o f
S o u r c e D F S q u a r e s M e a n S q u a r e F V a lu e P r > F
M o d e l 6 9 7 2 .3 4 3 7 5 0 1 6 2 .0 5 7 2 9 2 3 .6 1 0 .0 1 0 3

E r r o r 2 5 1 1 2 2 .8 7 5 0 0 0 4 4 .9 1 5 0 0 0

C o r r e c te d T o ta l 3 1 2 0 9 5 .2 1 8 7 5 0

R -S q u a r e C o e ff V a r R o o t M S E sc a b M e a n
0 .4 6 4 0 7 7 4 2 .8 0 6 3 3 6 .7 0 1 8 6 5 1 5 .6 5 6 2 5

S o u r c e D F T y p e I S S M e a n S q u a r e F V a lu e P r > F
tr e a tm e n t 6 9 7 2 .3 4 3 7 5 0 0 1 6 2 .0 5 7 2 9 1 7 3 .6 1 0 .0 1 0 3

S o u r c e D F T y p e III S S M e a n S q u a r e F V a lu e P r > F
tr e a tm e n t 6 9 7 2 .3 4 3 7 5 0 0 1 6 2 .0 5 7 2 9 1 7 3 .6 1 0 .0 1 0 3

C o n tr a st D F C o n tr a st S S M e a n S q u a r e F V a lu e P r > F
C o n tr o l v T r e a tm e n t 1 5 1 8 .0 1 0 4 1 6 7 5 1 8 .0 1 0 4 1 6 7 1 1 .5 3 0 .0 0 2 3

S p r in g v A u t u m n 1 2 2 8 .1 6 6 6 6 6 7 2 2 8 .1 6 6 6 6 6 7 5 .0 8 0 .0 3 3 2

W it h in S p r in g 2 3 2 .6 6 6 6 6 6 7 1 6 .3 3 3 3 3 3 3 0 .3 6 0 .6 9 8 8

W it h in A u t u m n 2 1 9 3 .5 0 0 0 0 0 0 9 6 .7 5 0 0 0 0 0 2 .1 5 0 .1 3 7 1

Written by Debbie Street, 35356: Lecture 3 14


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 4

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : s c a b

T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 8

T h e U N IV A R IA T E P ro c e d u re
V a r ia b le : r e s i

M o m e n ts
N 3 2 S u m W e ig h t s 3 2

M e a n 0 S u m O b s e r v a t io n s 0

S t d D e v ia t io n 6 .0 1 8 4 5 2 8 1 V a r ia n c e 3 6 .2 2 1 7 7 4 2

S k e w n e ss - 0 .1 7 7 4 0 5 3 K u r t o s is - 0 .1 9 7 7 9 2 3

U n c o r r e c te d S S 1 1 2 2 .8 7 5 C o r r e c te d S S 1 1 2 2 .8 7 5

C o e f f V a r ia t io n . S td E r r o r M e a n 1 .0 6 3 9 2 2 2

B a s ic S t a t is t ic a l M e a s u r e s
L o c a t io n V a r ia b ilit y
M e a n 0 .0 0 0 0 0 S t d D e v ia t io n 6 .0 1 8 4 5

M e d ia n 0 .6 2 5 0 0 V a r ia n c e 3 6 .2 2 1 7 7

M o d e - 5 .5 0 0 0 0 R a n g e 2 5 .8 7 5 0 0
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 6
I n t e r q u a r t ile R a n g e 8 .8 7 5 0 0

N o t e : T h e m o d e d i s p l a y e d T h i s e t G h e L s M m P a l r l o e c s te d o u f r 5 e m o d e s w i t h a c o u n t o f 2 .

L e v e n e ' s T T e es t s t f s o fr o H r o L m o c o a g t e i on n e :i t y M o u f 0 s = c 0 a b V a r ia n c e
A N O V A o f S q u a r e d D e v ia t io n s fr o m G r o u p M e a n s
T e st S ta t is t ic p V a lu e
S u m o f M e a n
S o u r c e S t u d e n t ' s Dt F t S q u a r e s 0S q P u ra r > e | t | F V a 1 l . u 0 0e 0 0 P r > F
t r e a t m e S n i gt n 6 M 2 5 5 2 4 .5 1 4 P2 5 r 4 > . 1 = | M | 02 . . 86 69 0 1 0 .0 3 7 2

E r r o r S i g n e d R a n 2 k5 S 3 9 4 8 6 . 9 1 2 . 5 1 P5 7 r 9 > . 5 = | S | 0 .8 1 9 4

T e s t s f o r N o r m a lit y
T e st S t a t is t ic p V a lu e
S h a p ir o - W ilk W 0 .9 8 2 6 7 P r < W 0 .8 7 2 4

K o lm o g o r o v - S m ir n o v D 0 .1 0 6 6 6 3 P r > D > 0 .1 5 0 0

C r a m e r - v o n M is e s W -S q 0 .0 5 2 8 8 P r > W -S q > 0 .2 5 0 0

A n d e r s o n - D a r lin g A -S q 0 .2 8 4 0 5 2 P r > A -S q > 0 .2 5 0 0

Written by Debbie Street, 35356: Lecture 3 15


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 0

T h e G L M P ro c e d u re

T u k e y 's S tu d e n tiz e d R a n g e (H S D ) T e s t fo r s c a b

N o te : T h is te s t c o n tro ls th e T y p e I e x p e rim e n tw is e e rro r ra te .

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 2 5

E r r o r M e a n S q u a r e 4 4 .9 1 5

C r it ic a l V a lu e o f S t u d e n t iz e d R a n g e 4 .5 2 5 7 7 T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 1

T h e G L M P ro c e d u re
C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
in d ic a t e d b y * * * . T u k e y 's S tu d e n tiz e d R a n g e (H S D ) T e s t fo r s c a b
S im u lt a n e o u s
D if f e r e n c e 9 5 % C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
tr e a tm e n t B e tw e e n C o n f id e n c e in d ic a t e d b y * * * .
C o m p a r is o n M e a n s L im it s S im u lt a n e o u s
C o n tr o l - S 6 0 0 4 .3 7 5 - 8 .7 5 9 1 7 .5 0 9 D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e
C o n tr o l - S 3 0 0 5 .8 7 5 - 7 .2 5 9 1 9 .0 0 9 C o m p a r is o n M e a n s L im it s
C o n tr o l - A 6 0 0 7 .1 2 5 - 6 .0 0 9 2 0 .2 5 9 A 6 0 0 - A 3 0 0 6 .0 0 0 - 9 .1 6 6 2 1 .1 6 6

C o n tr o l - S 1 2 0 0 8 .3 7 5 - 4 .7 5 9 2 1 .5 0 9 A 6 0 0 - A 1 2 0 0 9 .7 5 0 - 5 .4 1 6 2 4 .9 1 6

C o n tr o l - A 3 0 0 1 3 .1 2 5 - 0 .0 0 9 2 6 .2 5 9 S 1 2 0 0 - C o n tr o l - 8 .3 7 5 - 2 1 .5 0 9 4 .7 5 9

C o n tr o l - A 1 2 0 0 1 6 .8 7 5 3 .7 4 1 3 0 .0 0 9 * * * S 1 2 0 0 - S 6 0 0 - 4 .0 0 0 - 1 9 .1 6 6 1 1 .1 6 6

S 6 0 0 - C o n tr o l - 4 .3 7 5 - 1 7 .5 0 9 8 .7 5 9 S 1 2 0 0 - S 3 0 0 - 2 .5 0 0 - 1 7 .6 6 6 1 2 .6 6 6

S 6 0 0 - S 3 0 0 1 .5 0 0 - 1 3 .6 6 6 1 6 .6 6 6 S 1 2 0 0 - A 6 0 0 - 1 .2 5 0 - 1 6 .4 1 6 1 3 .9 1 6

S 6 0 0 - A 6 0 0 2 .7 5 0 - 1 2 .4 1 6 1 7 .9 1 6 S 1 2 0 0 - A 3 0 0 4 .7 5 0 - 1 0 .4 1 6 1 9 .9 1 6

S 6 0 0 - S 1 2 0 0 4 .0 0 0 - 1 1 .1 6 6 1 9 .1 6 6 S 1 2 0 0 - A 1 2 0 0 8 .5 0 0 - 6 .6 6 6 2 3 .6 6 6

S 6 0 0 - A 3 0 0 8 .7 5 0 - 6 .4 1 6 2 3 .9 1 6 A 3 0 0 - C o n tr o l - 1 3 .1 2 5 - 2 6 .2 5 9 0 .0 0 9

S 6 0 0 - A 1 2 0 0 1 2 .5 0 0 - 2 .6 6 6 2 7 .6 6 6 A 3 0 0 - S 6 0 0 - 8 .7 5 0 - 2 3 .9 1 6 6 .4 1 6

S 3 0 0 - C o n tr o l - 5 .8 7 5 - 1 9 .0 0 9 7 .2 5 9 A 3 0 0 - S 3 0 0 - 7 .2 5 0 - 2 2 .4 1 6 7 .9 1 6

S 3 0 0 - S 6 0 0 - 1 .5 0 0 - 1 6 .6 6 6 1 3 .6 6 6 A 3 0 0 - A 6 0 0 - 6 .0 0 0 - 2 1 .1 6 6 9 .1 6 6

S 3 0 0 - A 6 0 0 1 .2 5 0 - 1 3 .9 1 6 1 6 .4 1 6 A 3 0 0 - S 1 2 0 0 - 4 .7 5 0 - 1 9 .9 1 6 1 0 .4 1 6

S 3 0 0 - S 1 2 0 0 2 .5 0 0 - 1 2 .6 6 6 1 7 .6 6 6 A 3 0 0 - A 1 2 0 0 3 .7 5 0 - 1 1 .4 1 6 1 8 .9 1 6

S 3 0 0 - A 3 0 0 7 .2 5 0 - 7 .9 1 6 2 2 .4 1 6 A 1 2 0 0 - C o n tr o l - 1 6 .8 7 5 - 3 0 .0 0 9 - 3 .7 4 1 * * *

S 3 0 0 - A 1 2 0 0 1 1 .0 0 0 - 4 .1 6 6 2 6 .1 6 6 A 1 2 0 0 - S 6 0 0 - 1 2 .5 0 0 - 2 7 .6 6 6 2 .6 6 6

A 6 0 0 - C o n tr o l - 7 .1 2 5 - 2 0 .2 5 9 6 .0 0 9 A 1 2 0 0 - S 3 0 0 - 1 1 .0 0 0 - 2 6 .1 6 6 4 .1 6 6

A 6 0 0 - S 6 0 0 - 2 .7 5 0 - 1 7 .9 1 6 1 2 .4 1 6 A 1 2 0 0 - A 6 0 0 - 9 .7 5 0 - 2 4 .9 1 6 5 .4 1 6

A 6 0 0 - S 3 0 0 - 1 .2 5 0 - 1 6 .4 1 6 1 3 .9 1 6 A 1 2 0 0 - S 1 2 0 0 - 8 .5 0 0 - 2 3 .6 6 6 6 .6 6 6

A 6 0 0 - S 1 2 0 0 1 .2 5 0 - 1 3 .9 1 6 1 6 .4 1 6 A 1 2 0 0 - A 3 0 0 - 3 .7 5 0 - 1 8 .9 1 6 1 1 .4 1 6

Written by Debbie Street, 35356: Lecture 3 16


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 6

T h e G L M P ro c e d u re

T u k e y 's S tu d e n tiz e d R a n g e (H S D ) T e s t fo r s c a b

N o te : T h is te s t c o n tro ls th e T y p e I e x p e rim e n tw is e e rro r ra te , b u t it g e n e ra lly h a s a h ig h e r T y p e II e rro r ra te th a n R E G W Q .

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 2 5

E r r o r M e a n S q u a r e 4 4 .9 1 5

C r it ic a l V a lu e o f S t u d e n t iz e d R a n g e 4 .5 2 5 7 7

M in im u m S ig n if ic a n t D if f e r e n c e 1 4 .6 1 4

H a r m o n ic M e a n o f C e ll S iz e s 4 .3 0 7 6 9 2

N o te : C e ll s iz e s a re n o t e q u a l.

M e a n s w it h t h e s a m e le t t e r a r e n o t
s ig n if ic a n t ly d if f e r e n t .
T u k e y G r o u p in g M e a n N tr e a tm e n t
A 2 2 .6 2 5 8 C o n tro l
A
B A 1 8 .2 5 0 4 S 6 0 0
B A
B A 1 6 .7 5 0 4 S 3 0 0
B A
B A 1 5 .5 0 0 4 A 6 0 0
B A
B A 1 4 .2 5 0 4 S 1 2 0 0
B A
B A 9 .5 0 0 4 A 3 0 0
B
B 5 .7 5 0 4 A 1 2 0 0

Written by Debbie Street, 35356: Lecture 3 17


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 8

T h e G L M P ro c e d u re

t T e s ts (L S D ) fo r s c a b

N o te : T h is te s t c o n tro ls th e T y p e I c o m p a ris o n w is e e rro r ra te , n o t th e e x p e rim e n tw is e e rro r ra te .

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 2 5

E r r o r M e a n S q u a r e 4 4 .9 1 5

C r it ic a l V a lu e o f t 2 .0 5 9 5 4

C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
in d ic a t e d b y * * * .
D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e
C o m p a r is o n M e a n s L im it s
C o n tr o l - S 6 0 0 4 .3 7 5 - 4 .0 7 7 1 2 .8 2 7

C o n tr o l - S 3 0 0 5 .8 7 5 - 2 .5 7 7 1 4 .3 2 7

C o n tr o l - A 6 0 0 7 .1 2 5 - 1 .3 2 7 1 5 .5 7 7

C o n tr o l - S 1 2 0 0 8 .3 7 5 - 0 .0 7 7 1 6 .8 2 7

C o n tr o l - A 3 0 0 1 3 .1 2 5 4 .6 7 3 2 1 .5 7 7 * * *

C o n tr o l - A 1 2 0 0 1 6 .8 7 5 8 .4 2 3 2 5 .3 2 7 * * *

S 6 0 0 - C o n tr o l - 4 .3 7 5 - 1 2 .8 2 7 4 .0 7 7

S 6 0 0 - S 3 0 0 1 .5 0 0 - 8 .2 6 0 1 1 .2 6 0

S 6 0 0 - A 6 0 0 2 .7 5 0 - 7 .0 1 0 1 2 .5 1 0

S 6 0 0 - S 1 2 0 0 4 .0 0 0 - 5 .7 6 0 1 3 .7 6 0

S 6 0 0 - A 3 0 0 8 .7 5 0 - 1 .0 1 0 1 8 .5 1 0

S 6 0 0 - A 1 2 0 0 1 2 .5 0 0 2 .7 4 0 2 2 .2 6 0 * * *

S 3 0 0 - C o n tr o l - 5 .8 7 5 - 1 4 .3 2 7 2 .5 7 7

S 3 0 0 - S 6 0 0 - 1 .5 0 0 - 1 1 .2 6 0 8 .2 6 0

S 3 0 0 - A 6 0 0 1 .2 5 0 - 8 .5 1 0 1 1 .0 1 0

S 3 0 0 - S 1 2 0 0 2 .5 0 0 - 7 .2 6 0 1 2 .2 6 0

S 3 0 0 - A 3 0 0 7 .2 5 0 - 2 .5 1 0 1 7 .0 1 0

S 3 0 0 - A 1 2 0 0 1 1 .0 0 0 1 .2 4 0 2 0 .7 6 0 * * *

A 6 0 0 - C o n tr o l - 7 .1 2 5 - 1 5 .5 7 7 1 .3 2 7

A 6 0 0 - S 6 0 0 - 2 .7 5 0 - 1 2 .5 1 0 7 .0 1 0

A 6 0 0 - S 3 0 0 - 1 .2 5 0 - 1 1 .0 1 0 8 .5 1 0

A 6 0 0 - S 1 2 0 0 1 .2 5 0 - 8 .5 1 0 1 1 .0 1 0

A 6 0 0 - A 3 0 0 6 .0 0 0 - 3 .7 6 0 1 5 .7 6 0

Written by Debbie Street, 35356: Lecture 3 18


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 5
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 9
T h e G L M P ro c e d u re
T h e G L M P ro c e d u re
t T e s ts (L S D ) fo r s c a b
t T e s ts (L S D ) fo r s c a b
N o te : T h is te s t c o n tro ls th e T y p e I c o m p a ris o n w is e e rro r ra te , n o t th e e x p e rim e n tw is e e rro r ra te .

C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
A lp h a 0 .0 5
in d ic a t e d b y * * * .
E r r o r D e g r e e s o f F r e e d o m 2 5
D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e E r r o r M e a n S q u a r e 4 4 .9 1 5
C o m p a r is o n M e a n s L im it s
C r it ic a l V a lu e o f t 2 .0 5 9 5 4
A 6 0 0 - A 1 2 0 0 9 .7 5 0 - 0 .0 1 0 1 9 .5 1 0
L e a s t S ig n if ic a n t D if f e r e n c e 9 .4 0 5
S 1 2 0 0 - C o n tr o l - 8 .3 7 5 - 1 6 .8 2 7 0 .0 7 7
H a r m o n ic M e a n o f C e ll S iz e s 4 .3 0 7 6 9 2
S 1 2 0 0 - S 6 0 0 - 4 .0 0 0 - 1 3 .7 6 0 5 .7 6 0

S 1 2 0 0 - S 3 0 0 - 2 .5 0 0 - 1 2 .2 6 0 7 .2 6 0 N o te : C e ll s iz e s a re n o t e q u a l.

S 1 2 0 0 - A 6 0 0 - 1 .2 5 0 - 1 1 .0 1 0 8 .5 1 0
M e a n s w it h t h e s a m e le t t e r a r e n o t
S 1 2 0 0 - A 3 0 0 4 .7 5 0 - 5 .0 1 0 1 4 .5 1 0 s ig n if ic a n t ly d if f e r e n t .

S 1 2 0 0 - A 1 2 0 0 8 .5 0 0 - 1 .2 6 0 1 8 .2 6 0 t G r o u p in g M e a n N tr e a tm e n t

A 3 0 0 - C o n tr o l - 1 3 .1 2 5 - 2 1 .5 7 7 - 4 .6 7 3 * * * A 2 2 .6 2 5 8 C o n tro l

A 3 0 0 - S 6 0 0 - 8 .7 5 0 - 1 8 .5 1 0 1 .0 1 0 A
B A 1 8 .2 5 0 4 S 6 0 0
A 3 0 0 - S 3 0 0 - 7 .2 5 0 - 1 7 .0 1 0 2 .5 1 0
B A
A 3 0 0 - A 6 0 0 - 6 .0 0 0 - 1 5 .7 6 0 3 .7 6 0
B A 1 6 .7 5 0 4 S 3 0 0
A 3 0 0 - S 1 2 0 0 - 4 .7 5 0 - 1 4 .5 1 0 5 .0 1 0
B A
A 3 0 0 - A 1 2 0 0 3 .7 5 0 - 6 .0 1 0 1 3 .5 1 0
B A 1 5 .5 0 0 4 A 6 0 0
A 1 2 0 0 - C o n tr o l - 1 6 .8 7 5 - 2 5 .3 2 7 - 8 .4 2 3 * * *
B A
A 1 2 0 0 - S 6 0 0 - 1 2 .5 0 0 - 2 2 .2 6 0 - 2 .7 4 0 * * *
B A C 1 4 .2 5 0 4 S 1 2 0 0
A 1 2 0 0 - S 3 0 0 - 1 1 .0 0 0 - 2 0 .7 6 0 - 1 .2 4 0 * * *
B C
A 1 2 0 0 - A 6 0 0 - 9 .7 5 0 - 1 9 .5 1 0 0 .0 1 0
B C 9 .5 0 0 4 A 3 0 0
A 1 2 0 0 - S 1 2 0 0 - 8 .5 0 0 - 1 8 .2 6 0 1 .2 6 0
C
A 1 2 0 0 - A 3 0 0 - 3 .7 5 0 - 1 3 .5 1 0 6 .0 1 0 C 5 .7 5 0 4 A 1 2 0 0

Written by Debbie Street, 35356: Lecture 3 19


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 4

T h e G L M P ro c e d u re

D u n n e tt's t T e s ts fo r s c a b

N o te : T h is te s t c o n tro ls th e T y p e I e x p e rim e n tw is e e rro r fo r c o m p a ris o n s o f a ll tre a tm e n ts a g a in s t a c o n tro l.

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 2 5

E r r o r M e a n S q u a r e 4 4 .9 1 5

C r it ic a l V a lu e o f D u n n e t t 's t 2 .8 0 3 0 6

C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
in d ic a t e d b y * * * .
S im u lt a n e o u s
D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e
C o m p a r is o n M e a n s L im it s
S 6 0 0 - C o n tr o l - 4 .3 7 5 - 1 5 .8 7 9 7 .1 2 9

S 3 0 0 - C o n tr o l - 5 .8 7 5 - 1 7 .3 7 9 5 .6 2 9

A 6 0 0 - C o n tr o l - 7 .1 2 5 - 1 8 .6 2 9 4 .3 7 9

S 1 2 0 0 - C o n tr o l - 8 .3 7 5 - 1 9 .8 7 9 3 .1 2 9

A 3 0 0 - C o n tr o l - 1 3 .1 2 5 - 2 4 .6 2 9 - 1 .6 2 1 * * *

A 1 2 0 0 - C o n tr o l - 1 6 .8 7 5 - 2 8 .3 7 9 - 5 .3 7 1 * * *

Written by Debbie Street, 35356: Lecture 3 20


modified by Steve Bush
So was it worth adding sulphur?

T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 3

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : s c a b

S u m o f
proc glm data=lect.potato
S o u r c e D order=data;
F S q u a r e s M e a n S q u a r e F V a lu e P r > F
class treatment;M o d e l 6 9 7 2 .3 4 3 7 5 0 1 6 2 .0 5 7 2 9 2 3 .6 1 0 .0 1 0 3
model scab=treatment;
E r r o r 2 5 1 1 2 2 .8 7 5 0 0 0 4 4 .9 1 5 0 0 0
contrast ’Control
C o rv r e c t Treatment’
e d T o t a l 3 1 2 0 9 5 .2 1 8 7 5 0
treatment -6 1 1 1 1 1 1;
contrast ’Spring v Autumn’ R -S q u a r e C o e ff V a r R o o t M S E sc a b M e a n
treatment 0 1 1 1 0 -1 . 4 6 4 0 7 -1
7 4 -1;
2 .8 0 6 3 3 6 .7 0 1 8 6 5 1 5 .6 5 6 2 5
contrast ’Within Spring’
treatment 0 -1 0 S 1o u r 0c e 0 0, D F T y p e I S S M e a n S q u a r e F V a lu e P r > F
treatment 0 1 -2 t 1r e a t 0m e n0t 0;6 9 7 2 . 3 4 3 7 5 0 0 1 6 2 . 0 5 7 2 9 1 7 3 .6 1 0 .0 1 0 3
contrast ’Within Autumn’
treatment 0 0 0 0 -1 0 1,
S o u r c e D F T y p e I I I S S M e a n S q u a r e F V a lu e P r > F
treatment 0 0 0 0 1 -2 1;
tr e a tm e n t 6 9 7 2 .3 4 3 7 5 0 0 1 6 2 .0 5 7 2 9 1 7 3 .6 1 0 .0 1 0 3
run;

C o n tr a st D F C o n tr a st S S M e a n S q u a r e F V a lu e P r > F
C o n tr o l v T r e a tm e n t 1 5 1 8 .0 1 0 4 1 6 7 5 1 8 .0 1 0 4 1 6 7 1 1 .5 3 0 .0 0 2 3

S p r in g v A u t u m n 1 2 2 8 .1 6 6 6 6 6 7 2 2 8 .1 6 6 6 6 6 7 5 .0 8 0 .0 3 3 2

W it h in S p r in g 2 3 2 .6 6 6 6 6 6 7 1 6 .3 3 3 3 3 3 3 0 .3 6 0 .6 9 8 8

W it h in A u t u m n 2 1 9 3 .5 0 0 0 0 0 0 9 6 .7 5 0 0 0 0 0 2 .1 5 0 .1 3 7 1

Written by Debbie Street, 35356: Lecture 3 21


modified by Steve Bush
Spring vs Autumn

Written by Debbie Street, 35356: Lecture 3 22


modified by Steve Bush
Within Spring and Within Autumn

Written by Debbie Street, 35356: Lecture 3 23


modified by Steve Bush
Scheffe’s method T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 2

T h e G L M P ro c e d u re

S c h e ffe 's T e s t fo r s c a b

N o t e : T h i s t e s t c o n t r o l s t h e T y p e I e x p e r i m e n t w i s e e r r o r r a t e , b u t i t g e n e r a l l y h a s a h i g h e r T y p e I I e r r o r r a t e t h a n T u k e y 's f o r a l l p a i r w i s e
c o m p a ris o n s .

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 2 5

E r r o r M e a n S q u a r e 4 4 .9 1 5

C r it ic a l V a lu e o f F 2 .4 9 0 4 1

C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e
in d ic a t e d b y * * * .
S im u lt a n e o u s
D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e
C o m p a r is o n M e a n s L im it s
C o n tr o l - S 6 0 0 4 .3 7 5 - 1 1 .4 8 9 2 0 .2 3 9

C o n tr o l - S 3 0 0 5 .8 7 5 - 9 .9 8 9 2 1 .7 3 9

C o n tr o l - A 6 0 0 7 .1 2 5 - 8 .7 3 9 2 2 .9 8 9

C o n tr o l - S 1 2 0 0 8 .3 7 5 - 7 .4 8 9 2 4 .2 3 9

C o n tr o l - A 3 0 0 1 3 .1 2 5 - 2 .7 3 9 2 8 .9 8 9

C o n tr o l - A 1 2 0 0 1 6 .8 7 5 1 .0 1 1 3 2 .7 3 9 * * *

S 6 0 0 - C o n tr o l - 4 .3 7 5 - 2 0 .2 3 9 1 1 .4 8 9

S 6 0 0 - S 3 0 0 1 .5 0 0 - 1 6 .8 1 9 1 9 .8 1 9

S 6 0 0 - A 6 0 0 2 .7 5 0 - 1 5 .5 6 9 2 1 .0 6 9

S 6 0 0 - S 1 2 0 0 4 .0 0 0 - 1 4 .3 1 9 2 2 .3 1 9

S 6 0 0 - A 3 0 0 8 .7 5 0 - 9 .5 6 9 2 7 .0 6 9

S 6 0 0 - A 1 2 0 0 1 2 .5 0 0 - 5 .8 1 9 3 0 .8 1 9

S 3 0 0 - C o n tr o l - 5 .8 7 5 - 2 1 .7 3 9 9 .9 8 9

S 3 0 0 - S 6 0 0 - 1 .5 0 0 - 1 9 .8 1 9 1 6 .8 1 9

S 3 0 0 - A 6 0 0 1 .2 5 0 - 1 7 .0 6 9 1 9 .5 6 9

S 3 0 0 - S 1 2 0 0 2 .5 0 0 - 1 5 .8 1 9 2 0 .8 1 9

S 3 0 0 - A 3 0 0 7 .2 5 0 - 1 1 .0 6 9 2 5 .5 6 9

S 3 0 0 - A 1 2 0 0 1 1 .0 0 0 - 7 .3 1 9 2 9 .3 1 9

A 6 0 0 - C o n tr o l - 7 .1 2 5 - 2 2 .9 8 9 8 .7 3 9

A 6 0 0 - S 6 0 0 - 2 .7 5 0 - 2 1 .0 6 9 1 5 .5 6 9

A 6 0 0 - S 3 0 0 - 1 .2 5 0 - 1 9 .5 6 9 1 7 .0 6 9

A 6 0 0 - S 1 2 0 0 1 .2 5 0 - 1 7 .0 6 9 1 9 .5 6 9

Written by Debbie Street, 35356: Lecture 3 24


modified by Steve Bush
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 3
T h u rs d a y , M a rc h 1 3 , 2 0 1 4 1 2 :3 4 :2 9 P M 1 7
T h e G L M P ro c e d u re
T h e G L M P ro c e d u re
S c h e ffe 's T e s t fo r s c a b
S c h e ffe 's T e s t fo r s c a b
C o m p a r is o n s s ig n if ic a n t a t t h e 0 .0 5 le v e l a r e N o te : T h is te s t c o n tro ls th e T y p e I e x p e rim e n tw is e e rro r ra te .
in d ic a t e d b y * * * .
S im u lt a n e o u s A lp h a 0 .0 5
D if f e r e n c e 9 5 %
tr e a tm e n t B e tw e e n C o n f id e n c e E r r o r D e g r e e s o f F r e e d o m 2 5
C o m p a r is o n M e a n s L im it s
E r r o r M e a n S q u a r e 4 4 .9 1 5
A 6 0 0 - A 3 0 0 6 .0 0 0 - 1 2 .3 1 9 2 4 .3 1 9
C r it ic a l V a lu e o f F 2 .4 9 0 4 1
A 6 0 0 - A 1 2 0 0 9 .7 5 0 - 8 .5 6 9 2 8 .0 6 9
M in im u m S ig n if ic a n t D if f e r e n c e 1 7 .6 5 2
S 1 2 0 0 - C o n tr o l - 8 .3 7 5 - 2 4 .2 3 9 7 .4 8 9
H a r m o n ic M e a n o f C e ll S iz e s 4 .3 0 7 6 9 2
S 1 2 0 0 - S 6 0 0 - 4 .0 0 0 - 2 2 .3 1 9 1 4 .3 1 9
N o te : C e ll s iz e s a re n o t e q u a l.
S 1 2 0 0 - S 3 0 0 - 2 .5 0 0 - 2 0 .8 1 9 1 5 .8 1 9

S 1 2 0 0 - A 6 0 0 - 1 .2 5 0 - 1 9 .5 6 9 1 7 .0 6 9 M e a n s w it h t h e s a m e le t t e r a r e n o t
s ig n if ic a n t ly d if f e r e n t .
S 1 2 0 0 - A 3 0 0 4 .7 5 0 - 1 3 .5 6 9 2 3 .0 6 9
S c h e f f e G r o u p in g M e a n N tr e a tm e n t
S 1 2 0 0 - A 1 2 0 0 8 .5 0 0 - 9 .8 1 9 2 6 .8 1 9
A 2 2 .6 2 5 8 C o n tro l
A 3 0 0 - C o n tr o l - 1 3 .1 2 5 - 2 8 .9 8 9 2 .7 3 9
A
A 3 0 0 - S 6 0 0 - 8 .7 5 0 - 2 7 .0 6 9 9 .5 6 9
A 1 8 .2 5 0 4 S 6 0 0
A 3 0 0 - S 3 0 0 - 7 .2 5 0 - 2 5 .5 6 9 1 1 .0 6 9
A
A 3 0 0 - A 6 0 0 - 6 .0 0 0 - 2 4 .3 1 9 1 2 .3 1 9
A 1 6 .7 5 0 4 S 3 0 0
A 3 0 0 - S 1 2 0 0 - 4 .7 5 0 - 2 3 .0 6 9 1 3 .5 6 9
A
A 3 0 0 - A 1 2 0 0 3 .7 5 0 - 1 4 .5 6 9 2 2 .0 6 9
A 1 5 .5 0 0 4 A 6 0 0
A 1 2 0 0 - C o n tr o l - 1 6 .8 7 5 - 3 2 .7 3 9 - 1 .0 1 1 * * *
A
A 1 2 0 0 - S 6 0 0 - 1 2 .5 0 0 - 3 0 .8 1 9 5 .8 1 9 A 1 4 .2 5 0 4 S 1 2 0 0
A 1 2 0 0 - S 3 0 0 - 1 1 .0 0 0 - 2 9 .3 1 9 7 .3 1 9 A
A 1 2 0 0 - A 6 0 0 - 9 .7 5 0 - 2 8 .0 6 9 8 .5 6 9 A 9 .5 0 0 4 A 3 0 0
A 1 2 0 0 - S 1 2 0 0 - 8 .5 0 0 - 2 6 .8 1 9 9 .8 1 9 A
A 1 2 0 0 - A 3 0 0 - 3 .7 5 0 - 2 2 .0 6 9 1 4 .5 6 9 A 5 .7 5 0 4 A 1 2 0 0

Written by Debbie Street, 35356: Lecture 3 25


modified by Steve Bush
EXAMPLE 5. (from Dean and Voss p129)
The data in the table below (marga.sas7bdat) are the melting times in seconds for
three different brands of margarine (coded 1-3) and one brand of butter (coded 4).
The butter was used for comparison purposes. The sizes and shapes of the initial
margarine/butter pats were as similar as possible, and these were melted one by one
in a clean frying pan over a constant heat.

Margarine 1 Margarine 2 Margarine 3 Butter


167 176 231 225 176 176 201 223
171 185 233 241 168 169 199 209
178 172 236 248 171 164 196 219
175 178 252 239 172 169 211 212
184 178 233 248 178 171 209 210
proc glm data=lect.marga order=data;
class brand;
model time=brand;
contrast ’Butter v Margarine’
brand 1 1 1 -3;
contrast ’Within Margarine’
brand -1 0 1 0,
brand -1 2 -1 0;
means brand/hovtest=levene cldiff lines tukey;
output out=marg2 residual=resi;
run;

proc univariate data=marg2 normaltest;


var resi;
run; W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 2

T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : T IM E

S u m o f
S o u r c e D F S q u a r e s M e a n S q u a r e F V a lu e P r > F

M o d e l 3 2 9 3 8 5 .6 7 5 0 0 9 7 9 5 .2 2 5 0 0 2 0 0 .3 5 < .0 0 0 1

E r r o r 3 6 1 7 6 0 .1 0 0 0 0 4 8 .8 9 1 6 7

C o r r e c te d T o ta l 3 9 3 1 1 4 5 .7 7 5 0 0

R -S q u a r e C o e ff V a r R o o t M S E T IM E M e a n

0 .9 4 3 4 8 8 3 .5 1 6 7 9 0 6 .9 9 2 2 5 8 1 9 8 .8 2 5 0

S o u r c e D F T y p e I S S M e a n S q u a r e F V a lu e P r > F

B R A N D 3 2 9 3 8 5 .6 7 5 0 0 9 7 9 5 .2 2 5 0 0 2 0 0 .3 5 < .0 0 0 1

Written by Debbie Street,


S o u r c e D F 35356:
T y p e I I I S S Lecture
M e a n S q u a r e3 F V a lu e P r > F 26
modified by Steve BushB R A N D 3 2 9 3 8 5 .6 7 5 0 0 9 7 9 5 .2 2 5 0 0 2 0 0 .3 5 < .0 0 0 1
W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 1 2
M o d e l 3 2 9 3 8 5 .6 7 5 0 0 9 7 9 5 .2 2 5 0 0 2 0 0 .3 5 < .0 0 0 1
T h e U N IV A R IA T E P r o c e d u r e
E r r o r 3 6 1 V 7 a 6 r0 i . a 1 0 b 0 l 0 e 0 : r e s i 4 8 . 8 9 1 6 7

C o r r e c te d T o ta l 3 9 3 1 1 4 5 .7 7 5 0 0
M o m e n ts

N 4 0 S u m W e ig h t s 4 0
R -S q u a r e C o e ff V a r R o o t M S E T IM E M e a n
M e a n 0 S u m O b s e r v a t io n s 0
0 .9 4 3 4 8 8 3 .5 1 6 7 9 0 6 .9 9 2 2 5 8 1 9 8 .8 2 5 0
S t d D e v ia t io n 6 .7 1 7 9 4 3 8 2 V a r ia n c e 4 5 .1 3 0 7 6 9 2

S k e w n e s s 0 .0 9 2 8 6 5 3 3 K u r t o s is -0 .2 7 1 2 3 4 2

U nS c o o u r r r c e e c t e d D S F S T y p 1 e 7 6I 0S . S 1 M C oe a r r n e cS t q e u d a S r e S F V a lu e 1 P 7 r 6 > 0 . F1

C o B e R f f A V N a D r i a t i o n3 2 9 3 8 5 .6 7 5 0 0. S t 9 d 7 E 9 5 r r . 2 o 2 r 5 M 0 e0 a n 2 0 0 . 3 1 5 . 0 6 2 < 2 . 00 00 10 81

S o u r c e D F T B y a p s e i c I I S I tS a S t i s t i M c a e l a M n e S a q s u u a r e r e s F V a lu e P r > F

B R A N D L o 3 c a t i o2 9 n 3 8 5 . 6 7 5 0 0 9 7 9 V5 . a 2 r 2 i a 5 b 0 i 0 l i t y 2 0 0 .3 5 < .0 0 0 1

M e a n 0 .0 0 0 0 0 S t d D e v ia t io n 6 .7 1 7 9 4
C o n tr a s t M e d ia n 0 D . 1F 0 0 0 C 0 o n t V r a a s r i t a S n cS e M e a n S q u a r 4 e 5 . 1 3 F 0 V7 7 a l u e P r > F

B u t t e r v M a M r o g d a er i n e - 0 . 4 1 0 0 0 0 1 3 5 R 3 .a 4 n 0 g 8 e 3 3 1 3 5 3 . 4 0 8 3 2 3 7 . 7 0 0 02 07 . 6 8 < .0 0 0 1

W it h in M a r g a r in e 2 2 8 0 3 I 2 n . t 2 e 6 r 6 q 6 u 7 a r t i l e 1 4 R 0 a 1 n 6 g . 1 e 3 3 3 3 8 . 7 5 02 08 06 . 6 8 < .0 0 0 1
W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 4
N o t e : T h e m o d e d is p la y e d is t h e s m a lle s t o f 2 m o d e s w it h a c o u n t o f 3 .
T h e G L M P ro c e d u re
T e s t s fo r L o c a t io n : M u 0 = 0
L e v e n e 's T e s t fo r H o m o g e n e it y o f T IM E V a r ia n c e
A T Ne s O t V A o f S q u a r e d S t D a et i v s i t a i c t i o n s f r o m G p r V o ua l p u e M e a n s

S t u d e n t 's t tS u m o f 0 M P e r a n> | t | 1 .0 0 0 0
S o u r c e D F S q u a r e s S q u a r e F V a lu e P r > F
S ig n M 1 P r > = |M | 0 .8 7 4 6
B R A N D 3 1 9 8 1 8 .2 6 6 0 6 .1 2 .2 6 0 .0 9 8 2
S ig n e d R a n k S 0 P r > = |S | 1 .0 0 0 0
E r r o r 3 6 1 0 5 2 7 4 2 9 2 4 .3

T e s t s fo r N o r m a lit y

T e s t S t a t is t ic p V a lu e

S h a p ir o - W ilk W 0 .9 8 3 3 4 2 P r < W 0 .8 1 0 4

K o lm o g o r o v - S m ir n o v D 0 .0 8 5 4 5 2 P r > D > 0 .1 5 0 0

C r a m e r - v o n M is e s W -S q 0 .0 4 0 6 7 1 P r > W -S q > 0 .2 5 0 0
W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 3
A n d e r s o n - D a r lin g A -S q 0 .2 3 7 7 3 3 P r > A -S q > 0 .2 5 0 0
T h e G L M P ro c e d u re

D e p e n d e n t V a r ia b le : T IM E
Q u a n t ile s ( D e fin it io n 5 )
D is trib u tio n o f T IM E
L e v e l Q u a n t ile
F 2 0 0 .3 5
P ro b > F < .0 0 0 1
1 0 0 % M a x 1 4 .1 0
2 4 0
9 9 % 1 4 .1 0

9 5 % 1 1 .7 5

2 2 0 9 0 % 9 .4 0

7 5 % Q 3 3 .8 5
T IM E

5 0 % M e d ia n 0 .1 0
2 0 0

1 8 0

1 6 0

1 2 3 4
B R A N D

Written by Debbie Street, 35356: Lecture 3 27


modified by Steve Bush
W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 7

T h e G L M P ro c e d u re

T u k e y 's S t u d e n t iz e d R a n g e ( H S D ) T e s t f o r T IM E
N o t e : T h i s t e s t c o n t r o ls t h e T y p e I e x p e r i m e n t w i s e e r r o r r a t e .

A lp h a 0 .0 5

E r r o r D e g r e e s o f F r e e d o m 3 6

E r r o r M e a n S q u a r e 4 8 .8 9 1 6 7

C r it ic a l V a lu e o f S t u d e n t iz e d R a n g e 3 .8 0 8 8 0

M in im u m S ig n ific a n t D iffe r e n c e 8 .4 2 1 8

C o m p a r is o n s s ig n ific a n t a t t h e 0 .0 5 le v e l a r e
in d ic a t e d b y * * * .

S im u lt a n e o u s
D iffe r e n c e 9 5 %
B R A N D B e tw e e n C o n fid e n c e
C o m p a r is o n M e a n s L im it s

2 - 4 2 9 .7 0 0 2 1 .2 7 8 3 8 .1 2 2 * * *

2 - 1 6 2 .2 0 0 5 3 .7 7 8 7 0 .6 2 2 * * *

2 - 3 6 7 .2 0 0 5 8 .7 7 8 7 5 .6 2 2 * * * W e d n e s d a y , F e b ru a ry 1 1 , 2 0 1 5 1 2 :5 9 :0 4 A M 1 0

4 - 2 T h e - 2 G 9 . L 7 M0 0 P r - o3 8 c . 1 e 2 d 2 u r e- 2 1 . 2 7 8 * * *

T u k e y ' 4 s - S 1 t u d e n t i z e3 2 d . 5 R 0 0 a n g 2 e 4 . 0 ( H7 8 S D ) 4 0 T . 9 e 2 s 2 t f o * * r * T I M E
4 - 3 3 7 .5 0 0 2 9 .0 7 8 4 5 .9 2 2 * * *
N o t e : T h i s t e s t c o n t r o ls t h e T y p e I e x p e r i m e n t w i s e e r r o r r a t e , b u t i t g e n e r a lly h a s a h i g h e r T y p e I I e r r o r r a t e t h a n R E G W Q .
1 - 2 -6 2 .2 0 0 -7 0 .6 2 2 -5 3 .7 7 8 * * *
A lp h a 0 .0 5
1 - 4 -3 2 .5 0 0 -4 0 .9 2 2 -2 4 .0 7 8 * * *
E r r o r D e g r e e s o f F r e e d o m 3 6
1 - 3 5 .0 0 0 -3 .4 2 2 1 3 .4 2 2
E r r o r M e a n S q u a r e 4 8 .8 9 1 6 7
3 - 2 -6 7 .2 0 0 -7 5 .6 2 2 -5 8 .7 7 8 * * *
C r it ic a l V a lu e o f S t u d e n t iz e d R a n g e 3 .8 0 8 8 0
3 - 4 -3 7 .5 0 0 -4 5 .9 2 2 -2 9 .0 7 8 * * *
M in im u m S ig n ific a n t D iffe r e n c e 8 .4 2 1 8
3 - 1 -5 .0 0 0 -1 3 .4 2 2 3 .4 2 2

M e a n s w it h t h e s a m e le t t e r a r e n o t
s ig n ific a n t ly d iffe r e n t .

T u k e y G r o u p in g M e a n N B R A N D

A 2 3 8 .6 0 0 1 0 2

B 2 0 8 .9 0 0 1 0 4

C 1 7 6 .4 0 0 1 0 1

C 1 7 1 .4 0 0 1 0 3

Further Reading
These notes provide a summary of the methods used to analyse a completely ran-
domised design with a treatments. They are not intended to be exhaustive. For

Written by Debbie Street, 35356: Lecture 3 28


modified by Steve Bush
more information about one–way ANOVA, assumption checking, and multiple com-
parisons tests, see Dean and Voss [1999], Kuehl [2000], or Montgomery [2005]. For
more information about sample size determination, see Odeh and Fox [1991]. For
further information about nonparametric tests, see Conover [1999] or Gibbons and
Chakraborti [2003].

References
W.J. Conover. Practical Nonparmaetic Statistics. Wiley, 1999. ISBN 0471160687.

A. Dean and D. Voss. Design and Analysis of Experiments. New York: Springer,
1999. ISBN 0387985611.

J.D. Gibbons and S. Chakraborti. Nonparametric statistical inference. CRC Press,


2003. ISBN 0824740528.

R.O. Kuehl. Design of experiments: statistical principles of research design and


analysis. Duxbury/Thomson Learning, 2000. ISBN 0534368344.

E. Lı̄dums. Statistical Tables and Formulae. Berget Pty Ltd, 2002. ISBN
1875920005.

D.C. Montgomery. Design and analysis of experiments. John Wiley & Sons Inc,
2005. ISBN 047148735X.

R.E. Odeh and M. Fox. Sample size choice. Dekker, 1991. ISBN 0824786009.

Written by Debbie Street, 35356: Lecture 3 29


modified by Steve Bush

You might also like