Chapter Contents |
Previous |
Next |
The ANOVA Procedure |
This example uses statements for the analysis of a randomized block with two treatment factors occuring in a factorial structure. The data, from Neter, Wasserman, and Kutner (1990, p. 941), are from an experiment examining the effects of codeine and acupuncture on post-operative dental pain in male subjects. Both treatment factors have two levels. The codeine levels are a codeine capsule or a sugar capsule. The acupuncture levels are two inactive acupuncture points or two active acupuncture points. There are four distinct treatment combinations due to the factorial treatment structure. The 32 subjects are assigned to eight blocks of four subjects each based on an assessment of pain tolerance.
The data for the analysis are balanced, so PROC ANOVA is used. The data are as follows:
title 'Randomized Complete Block With Two Factors'; data PainRelief; input PainLevel Codeine Acupuncture Relief @@; datalines; 1 1 1 0.0 1 2 1 0.5 1 1 2 0.6 1 2 2 1.2 2 1 1 0.3 2 2 1 0.6 2 1 2 0.7 2 2 2 1.3 3 1 1 0.4 3 2 1 0.8 3 1 2 0.8 3 2 2 1.6 4 1 1 0.4 4 2 1 0.7 4 1 2 0.9 4 2 2 1.5 5 1 1 0.6 5 2 1 1.0 5 1 2 1.5 5 2 2 1.9 6 1 1 0.9 6 2 1 1.4 6 1 2 1.6 6 2 2 2.3 7 1 1 1.0 7 2 1 1.8 7 1 2 1.7 7 2 2 2.1 8 1 1 1.2 8 2 1 1.7 8 1 2 1.6 8 2 2 2.4 ;
The variable PainLevel is the blocking variable, and Codeine and Acupuncture represent the levels of the two treatment factors. The variable Relief is the pain relief score (the higher the score, the more relief the patient has).
The following code invokes PROC ANOVA. The blocking variable and treatment factors appear in the CLASS statement. The bar between the treatment factors Codeine and Acupuncture adds their main effects as well as their interaction Codeine*Acupuncture to the model.
proc anova; class PainLevel Codeine Acupuncture; model Relief = PainLevel Codeine|Acupuncture; run;
The results from the analysis are shown in Output 17.1.1 and Output 17.1.2.
Output 17.1.1: Class Level Information and ANOVA Table
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.