Doing More with Data Analysis |
You can use the Anova item on the Data Analysis menu to perform an analysis of variance (ANOVA). You can construct a simple analysis of variance, analysis of covariance (ANCOVA), multivariate analysis of variance (MANOVA), and repeated measures ANOVA. You must have SAS/STAT software licensed to complete this task.
In this section, you perform an analysis of variance on the VENEER table to show the relationship between the brand of veneer and the amount of veneer that was worn away during testing.
Additional Information |
For additional information on performing an analysis of variance, refer to the GLM and ANOVA procedures in the SAS/STAT User's Guide.
Instructions |
To display the Analysis of Variance window, follow this selection path:Tasks Data Analysis Anova Analysis of Variance
Analysis of Variance Window
Use the Dependent button to select WEAR as the dependent column.
The dependent column contains the measurements to be analyzed. The Select Table Variables window displays all the numeric columns in the VENEER table except any columns selected as BY or classification columns. If you have more than one dependent column, you can generate a separate ANOVA model for each dependent column or one multivariate model for the set of dependent columns.
Use the Classification button to select BRAND as the classification column.
The classification columns identify analysis groups. The variation in the dependent column values is analyzed within and across the classification groups to determine whether or not the classification columns are significant sources of variation. The Select Table Variables window displays all the columns in the VENEER table except for any columns selected as BY or dependent columns.
Each classification column is treated as a main effect in the model. You can modify the ANOVA model to add interactions, nested effects, covariates, and random effects by using the Additional options item in the Analysis of Variance window.
Follow this selection path:Run SubmitThe first page of the analysis appears showing the class level information.
Analysis of Variance Output
Use the scroll bars or the FORWARD command or function key to display the next page of the analysis.
Analysis of Variance Output (continued)
Refer to the GLM and ANOVA procedures in the SAS/STAT User's Guide for information about interpreting the statistics in this report.
Return to SAS/ASSIST software from the Output window. See Returning to SAS/ASSIST Windows from the Output Window for more information.
Performing a Repeated Measures ANOVA |
Repeated measures designs are characterized by recording several measurements over time or space on the same experimental unit. This section shows how to perform a repeated measures ANOVA with SAS/ASSIST software. The first part of the process is data entry. For this particular example, you apply a logarithmic function to the data and then you perform the repeated measures ANOVA.
This example uses the data from Example 7 in "The GLM Procedure" chapter of SAS/STAT User's Guide.
In this section, you enter the raw data using the Create Data task. For more information on this task, refer to the "Entering Data Interactively" chapter in Getting Started with SAS/ASSIST.
Follow this selection path:Tasks Data Management Create data Interactively Enter data in tabular form The Select a New SAS Table to Create window appears.
In the Table field, type GLMEX7 . If desired, select Permanent, select a library in which to store the table, and select OK twice. The Define a New SAS Table window appears.
Define the columns in the new table by editing this window so that it looks like the following display.
Define a New SAS Table Window With Columns Defined
You might need to resize the window to see all six rows.Follow this selection path: File CloseIf prompted, select Yes to save the changes. The FSEDIT window appears.
Type the following data into the table. Note that the hist5 column has a missing value for row 6 (drug=Morphine, depl=N).
Row (Obs) | drug | depl | hist0 | hist1 | hist3 | hist5 |
---|---|---|---|---|---|---|
1 | Morphine | N | 0.04 | 0.20 | 0.10 | 0.08 |
2 | Morphine | N | 0.02 | 0.06 | 0.02 | 0.02 |
3 | Morphine | N | 0.07 | 1.40 | 0.48 | 0.24 |
4 | Morphine | N | 0.17 | 0.57 | 0.35 | 0.24 |
5 | Morphine | Y | 0.10 | 0.09 | 0.13 | 0.14 |
6 | Morphine | Y | 0.12 | 0.11 | 0.10 |
|
7 | Morphine | Y | 0.07 | 0.07 | 0.06 | 0.07 |
8 | Morphine | Y | 0.05 | 0.07 | 0.06 | 0.07 |
9 | Trimethaphan | N | 0.03 | 0.62 | 0.31 | 0.22 |
10 | Trimethaphan | N | 0.03 | 1.05 | 0.73 | 0.60 |
11 | Trimethaphan | N | 0.07 | 0.83 | 1.07 | 0.80 |
12 | Trimethaphan | N | 0.09 | 3.13 | 2.06 | 1.23 |
13 | Trimethaphan | Y | 0.10 | 0.09 | 0.09 | 0.08 |
14 | Trimethaphan | Y | 0.08 | 0.09 | 0.09 | 0.10 |
15 | Trimethaphan | Y | 0.13 | 0.10 | 0.12 | 0.12 |
16 | Trimethaphan | Y | 0.06 | 0.05 | 0.05 | 0.05 |
Follow this selection path to exit the FSEDIT window:File CloseIf prompted, select Yes to save the changes.
In order to minimize correlation between the mean and the variance of the data, the logarithm of the data needs to be calculated.
Follow this selection path:Tasks Data management Subset/Copy The Subset or Copy a Table window appears.
If the active table is not GLMEX7, use the Table button to select it from the WORK library, or, if you chose to save the table permanently, the permanent library where you saved the table.
Use the Output Table button. In the Output Table or View window, specify GLM7OUT as the name of the output table. Select Temporary or Permanent, as desired, before selecting OK.
Select Define new columns. The Define or Modify a Column window appears.
Select Initialize. The Enter Numeric Expression window appears. Select Function, then Mathematical functions. The Select Data window appears.
Select LOG(n). The Specify Arguments to a Function window appears.
Repeat steps 5 through 10 to create the LHIST1, LHIST3, and LHIST5 columns, using the HIST1, HIST3, and HIST5 columns, respectively, as parameters. When finished, select OK (instead of Add New Column) from the Define New Column to return to the Subset or Copy a Table window.
Select Submit from the Run menu. If desired, select OK, then Goback to view the table; otherwise, select Cancel, then Goback.
You are now ready to perform the repeated measures ANOVA.
Follow this selection path:Tasks Data Analysis Anova Analysis of Variance The Analysis of Variance window appears.
If the active table is not GLM7OUT, use the Table button to select the GLM7OUT table.
Use the Dependent button to select the LHIST0, LHIST1, LHIST3, and LHIST5 columns.
Use the Classification button to select the DRUG and DEPL columns.
Follow this selection path: Additional options Model effects Interactions The Interactions window appears.
Select DRUG, then *, then DEPL to construct the DRUG*DEPL interaction. Select OK, then Goback.
Select Analysis type, then Repeated measures, then Factor names and levels. The Repeated measures Factors window appears.
In this window, you specify the repeated factor and the number of levels associated with that factor. In the first row, type TIME for Factor Name and 4 for Number of Levels. Select OK.
Select Factor Values. The Repeated measures Factor Levels window appears.
In this window, you specify the intervals for the repeated factor. In the four active spaces under Level Values, type 0 , 1 , 3 , and 5 . Select OK.
Select Factor Transformations. The Repeated Measures Transformations window appears. In this window, you specify a single-degree-of-freedom contrast. For descriptions of each transformation, select Help.
Select Options. The Repeated Measures Options window appears.
Select Test within-subject effects to produce an analysis-of-variance table for each contrast defined by the within-subject factors. Select OK.
Select Goback three times to return to the Analysis of Variance window.
Select Submit from the Run menu. The results of the analysis appear in the Output window.
If desired, compare these results to those in Example 7 in "The GLM Procedure" chapter of SAS/STAT User's Guide.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.