Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

One-Way ANOVA: Weight gain in Anorexia patients

• Data File: Anorexia.xls


These data give the pre- & post-weights of patients being treated
for anorexia nervosa.
• There are actually 3 different treatment plans being used in this
study, & we wish to compare their performance.

The variables in the data file are:


group - treatment group (1 = family therapy, 2 = standard treatment, 3
= cognitive behavioral therapy)
prewt - weight at the beginning of treatment
postwt - weight at the end of the study period
Weight Gain - weight gained (or lost) during treatment (postwt-prewt)
One-Way ANOVA …
• Import the dataset Anorexia.xls to SAS EG.
• A portion of the data set is shown below:
One-Way ANOVA …
• From the main SAS EG menu, select Analyze ➔ ANOVA ➔ Linear
Models.

• Drag Weight gain to the slot under Dependent variables in


the rightmost panel. Then drag group to the slot under Classification
variables.

• This is shown in the next slide.


One-Way ANOVA …
One-Way ANOVA …
• Click Models from the navigation panel. Under Classes & quant.
Variables select group & click the highlighted button “Main” .
One-Way ANOVA …
• Click now Arithmetic from the navigation panel, under post Hoc
Tests.
• Click then the Add button shown down shown from the “Effects to
estimate:” navigation panel.
One-Way ANOVA …
• Now fill the window as shown below:
The ANOVA Output:
•The fig. below shows the results for the omnibus ANOVA procedure.
•The R-Square value in the middle table tells us that approximately 14% of the
variance in weight gain is explained by group.

The p-value contained in the ANOVA table is 0.0065, thus we reject the H 0 at the
alpha = 0.05 level & conclude significant differences in the mean weight gain
experienced by patients in the different therapy group exist.
The ANOVA Output: … MCP

If you reject the H0,

use a multiple comparison procedure (MCP):


The ANOVA Output: …
Now click the “Code” to see the window below:
The ANOVA Output: …
Scroll down to the code syntax, & when you are on the Proc GLM
position, click enter:

The answer to the question above on the left diagram come when u
click enter. Say yes & edit the Proc Glm as shown on the next slide.
The ANOVA Output: …
The modified “PROC GLM” to “PROC GLIMMIX” is shown below:

Click the green arrow to the right of Run, to get the results of MCP, as
shown on the slide next page.
The ANOVA Output: …

You might also like