Chapter Contents |
Previous |
Next |

Analysis of Variance |

Analysis of variance is a technique for exploring the variation of a continuous response variable (dependent variable). The response variable is measured at different levels of one or more classification variables (independent variables). The variation in the response due to the classification variables is computed, and you can test this variation against the residual error to determine the significance of the classification effects.

The Analyst Application provides several types of analyses of variance (ANOVA). The One-Way ANOVA task compares the means of the response variable over the groups defined by a single classification variable. See the section "One-Way Analysis of Variance" for more information.

The Nonparametric One-Way ANOVA task performs tests for location and scale differences over the groups defined by a single classification variable. Eight nonparametric tests are offered. See the section "Nonparametric One-Way Analysis of Variance" for more information.

The Factorial ANOVA task compares the means of the response variable over the groups defined by one or more classification variables. This type of analysis is useful when you have multiple ways of classifying the response values. See the "Factorial Analysis of Variance" section for more information.

The Linear Models task enables you to compare means and explain variation when you have a model that includes classification variables, quantitative variables, or both (such as in an analysis of covariance). See the "Linear Models" section for more information.

You can use the Repeated Measures task when you have multiple measurements of the response variable for the same experimental unit over different times or conditions or when the response values are assumed to be correlated within certain groups. For detailed information, see Chapter 16, "Repeated Measures."

The Mixed Models task enables you to fit basic mixed models. A mixed model is a linear model that contains both fixed effects and random effects. For detailed information, see Chapter 15, "Mixed Models."

The examples in this chapter demonstrate how you can use the Analyst Application to perform one-way and factorial ANOVA as well as to fit the linear model.

The first variable in the data set Air is a SAS datetime variable (datetime) that contains the date and the time of day on which the observation was taken. The data set contains two additional time-related variables related to datetime that record the day of the week (day) and the hour of the day ( hour).

The variables measuring air quality are co (carbon monoxide), o3 (ozone), so4 (sulfate), no (nitrous oxide), and dust (particulates). The final variable provided is wind, which gives the wind speed in knots.

- Select
**Tools****Sample Data**... - Select Air.
- Click
**OK**to create the sample data set in your Sasuser directory. - Select
**File****Open By SAS Name**... - Select Sasuser from the list of
**Libraries**. - Select Air from the list of members.
- Click
**OK**to bring the Air data set into the data table.

To perform the analyses in the following examples, you need to create a new variable to represent the factory workshift periods. The new character variable, shift, recodes the variable hour into three factory workshift periods. For information on recoding ranges and computing variables, see the section "Recoding Ranges" in Chapter 2.

Figure 10.2 displays the Recoding Ranges Information dialog. Enter the information to create the new variable as shown in Figure 10.2.

Click **OK** to display the Recoding Ranges dialog
(Figure 10.3). To define the values for the new variable,
shift, enter the values as shown in Figure 10.3.

The values of the new variable shift are as follows: `early' corresponds to the hours between 0 and 8 (from midnight until 8 a.m.), `daytime' corresponds to the hours between 8 and 16 (from 8 a.m. until 4 p.m.), and `late' corresponds to the hours greater than or equal to 16 (from 4 p.m. to midnight).

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.