One Way ANOVA using SAS - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

One Way ANOVA using SAS

Description:

We can get corrected sums of squares in each group and pool them: The sum of. these is my ... My ANOVA table should look something like: Source df Sum of ... – PowerPoint PPT presentation

Number of Views:204
Avg rating:3.0/5.0
Slides: 23
Provided by: BLU54
Category:
Tags: anova | sas | one | pool | table | using | way

less

Transcript and Presenter's Notes

Title: One Way ANOVA using SAS


1
One Way ANOVA using SAS
  • STT 501
  • Spring 2007

2
Example
  • Lets test to see if mercury level relates to
    surface area as defined by the following 4
    classes
  • low-lt75'Less than 75 acres'
  • 75-lt250'75-250 acres'
  • 250-lt625'250-625 acres'
  • 625-high'More than 625 acres'

3
Example
  • My ANOVA table should look something like
  • Source df Sum of Squares
  • S. Area
  • Error
  • Total
  • Lets see which of these we can fill in.

4
Totals
  • I can get some info for the total line from

One less than the number of observations will be
our total degrees of freedom
Which is our total sum of squares
This requests corrected sums of squares
5
Example
  • My ANOVA table should look something like
  • Source df Sum of Squares
  • S. Area
  • Error
  • Total 119 13.2169
  • OK, we can get error as well.

6
Error
  • We can get corrected sums of squares in each
    group and pool them

Should get 12.4578
Take one less than each of these and add them
to get error d.f.
2930 2730 116
The sum of these is my error sum of squares
7
Example
  • My ANOVA table should look something like
  • Source df Sum of Squares
  • S. Area
  • Error 116 12.4578
  • Total 119 13.2169
  • Now get the rest by subtraction...

8
Example
  • My ANOVA table should look something like
  • Source df Sum of Squares
  • S. Area 3 0.7591
  • Error 116 12.4578
  • Total 119 13.2169
  • And we should be able to construct the mean
    squares and the F-test

9
ANOVA Procedures
  • There are several procedures in SAS that can
    conduct the ANOVA, well use GLM (General Linear
    Model).
  • To get the analysis of mercury level vs. surface
    area category

10
ANOVA Procedures
Identifies the group variable
Required, since weve constructed groups with a
format
11
ANOVA Procedures
The model is always of the form response
group(s)
12
ANOVA Procedures
Note that SAS is a bit redundant here
In multi-factor cases, the model sum of
squares will be a sum of all the factors, which
are then separated at the bottom. Since surface
area is the only factor here, its sum of squares
is the same as the model.
This should be the same as our ANOVA table
13
Multiple Comparisons
  • From the results of our ANOVA, we see moderately
    significant evidence that mercury level is
    related to surface area category.
  • At this point, it would likely be useful to
    compare mercury levels across surface area
    categories.

14
Multiple Comparisons
  • We can get means for the response variable in
    each group using the means statement, and we can
    ask for comparisons as well.
  • Several multiple comparisons are available,
    including Bonferroni adjusted t-tests, Tukeys
    W, Ryans Q and Dunnetts test.

15
Example
Starred () comparisons are significant.
Note that these 2 are actually 1, its a bit
redundant in its listing
Check this note, Bonferroni is not best for all
pair-wise comparisons
Requests comparisons based on the
Bonferroni adjustment
Sets the experiment-wise error rate
16
Example
I can request Tukeys method, the output is of a
similar form (with similar results for this case).
17
Example
I also get an interesting note here.
If I include the lines option (I can do this with
bon as well), I get a bit different form
of output, where groups that are
not significantly different are marked.
18
Example
For unequal group sizes, it will use an
approximation based on the harmonic mean of the
group sizes. In fact, this is used when the
lines option is specified.
This approx. should be avoided if group
sizes are very different largest/smallest gt 1.5
Ryans Q will always give output in a grouping
form. This is because Ryans Q is designed
for equal group sizes.
We can request Ryans Q
19
Comparison with a Control
  • Dunnetts test for comparing each group to a
    control (or a predetermined group with every
    other group) is available.
  • Well use the birth weight data to check for
    differences in birth weight versus smoking
    status, taking non-smokers as a control.

20
Example
How did it know that 0 was the control? Well, of
course, it didnt know that. By default the
first value (in alphabetical or numeric order)
is taken as the control.
Requesting the Dunnett test here gets a
comparison of 0 (non-smoker) to every other.
21
Example
I get comparisons to current smokers. Not what I
want but currently smoke is first alphabetically.
If I use this format
22
Example
I can specify the control category. NOTE it is
case sensitive, so make sure you match it exactly.
Write a Comment
User Comments (0)
About PowerShow.com