Chapter Contents |
Previous |
Next |
Analysis of Variance |
The Linear Models task enables you to perform an analysis of variance when you have a continuous dependent variable with classification variables, quantitative variables, or both.
The data set Air, described in the section "The Air Quality Data Set", includes quantitative measures; for example, the variable wind represents wind speed, in knots. Suppose that you want to model ozone levels using the variables day (day of week), shift (factory workshift period), and wind (wind speed). Suppose that you also want your model to include the interaction between the variables day and shift. That is, you want to perform a simple two-way analysis of covariance with unequal slopes.
The following example fits this linear model and additionally requests a retrospective power analysis and a plot of the observed values versus the predicted values.
Figure 10.19 displays the Linear Models dialog.
By default, the linear model analysis includes only the main effects specified in the main dialog: no interaction term is included.
Note that you can build specific models with the Add, Cross, and Factorial buttons, or you can select a model by clicking on the Standard Models button and making a selection from the pop-up list.
Figure 10.20 displays the Model dialog with the terms shift and day and the interaction term shift*day selected as effects in the model.
To request power calculations for tests performed at several values, you can enter the values, separated by a space, in the box labeled Alphas. You can request power analysis for additional sample sizes in the Sample sizes box. You can enter one or more specific values for the sample sizes, or you can specify a series of sample sizes in the boxes labeled From:, To:, and By:.
Figure 10.21 displays the Power Analysis tab, which requests a retrospective power analysis with an alpha, or significance level, of 0.05.
Figure 10.22 displays the Predicted tab in the Plots dialog.
Click OK in the Linear Models dialog to perform the analysis.
Figure 10.23 displays the analysis of variance table, with an F statistic of 19.44 and an associated p-value less than 0.0001. A p-value this small indicates that the model explains a highly significant proportion of the variation in the dependent variable.
The R-square value represents the proportion of variability accounted for by the independent variables. In this analysis, about 74% of the variation of the ozone level can be accounted for by the model (that is, by mean differences in day and shift, in conjunction with a linear dependence on wind speed).
The last table displayed in Figure 10.23 partitions the model sum of squares into the separate contribution for each model effect and tests for the significance of each effect. The main effects and the interaction term are significant at the level (that is, each p-value is less than 0.05).
Figure 10.24 displays the retrospective power analysis. The observed power is given for each effect in the linear model.
The column labeled Least Significant Number in Figure 10.24 displays the smallest number of observations required to determine that the effect is significant at the given value.
Figure 10.25 displays the plot of the observed values versus the predicted values from the model. If the model predicts the observed values perfectly, the points on the plot fall on a straight line with a slope of 1. This plot indicates reasonable prediction.
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.