Chapter Contents

Previous

Next
Doing More with SAS/ASSIST Software

Performing an Analysis of Variance

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

  1. To display the Analysis of Variance window, follow this selection path:

    Tasks
    [arrow]
    Data Analysis
    [arrow]
    Anova
    [arrow]
    Analysis of Variance

    Analysis of Variance Window

    [IMAGE]

  2. Use the Table button to select the SASUSER.VENEER table.

  3. 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.

  4. 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.

  5. Follow this selection path:

    Run
    [arrow]
    Submit
    The first page of the analysis appears showing the class level information.

    Analysis of Variance Output

    [IMAGE]

  6. Use the scroll bars or the FORWARD command or function key to display the next page of the analysis.

    Analysis of Variance Output (continued)

    [IMAGE]

    Refer to the GLM and ANOVA procedures in the SAS/STAT User's Guide for information about interpreting the statistics in this report.

  7. 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.


Entering the Data

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 the SAS System Using SAS/ASSIST Software.

  1. Follow this selection path:

    Tasks
    [arrow]
    Data Management
    [arrow]
    Create data
    [arrow]
    Interactively
    [arrow]
    Enter data in tabular form
    The Select a New SAS Table to Create window appears.

  2. In the Table field, type GLMEX7. If desired, select Permanent, select a library in which to store the table, and select OK.. Select Goback. The Define a New SAS Table window appears.

  3. 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

    [IMAGE]

    You might need to resize the window to see all six rows.

  4. Follow this selection path:

    File
    [arrow]
    Close
    If prompted, select Yes to save the changes. The FSEDIT window appears.

  5. Enter the following data into the table. Note that the hist5 column has a missing value for row 6 (drug=Morphine, depl=N).

    Data for Repeated Measures ANOVA Example
    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

  6. Follow this selection path to exit the FSEDIT window:

    File
    [arrow]
    Close
    If prompted, select Yes to save the changes.

  7. 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
    [arrow]
    Data management
    [arrow]
    Subset/Copy
    The Subset or Copy a Table window appears.

  8. 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.

  9. 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 Goback.

  10. Select Define new columns. The Define or Modify a Column window appears.

  11. In the Column field, type LHIST0.

  12. Select Initialize. The Enter Numeric Expression window appears. Select Function, then Mathematical Functions. The Select Data window appears.

  13. Select LOG(n). The Specify Arguments to a Function window appears.

  14. In the Value for parameter field, type HIST0 and select OK,

  15. Select OK twice. The Define New Columns window appears.

  16. Select Add new column.

    Repeat steps 11 through 16 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.

  17. Select Submit from the Run menu. If desired, select OK, then Goback to view the table; otherwise, select Cancel, then Goback.

  18. You are now ready to perform the repeated measures ANOVA. Follow this selection path:

    Tasks
    [arrow]
    Data Analysis
    [arrow]
    Anova
    [arrow]
    Analysis of Variance
    The Analysis of Variance window appears.

  19. If the active table is not GLM7OUT, use the Table button to select the GLM7OUT table.

  20. Use the Dependent button to select the LHIST0, LHIST1, LHIST3, and LHIST5 columns.

  21. Use the Classification button to select the DRUG and DEPL columns.

  22. Follow this selection path:

    Additional options
    [arrow]
    Model effects
    [arrow]
    Interactions
    The Interactions window appears.

  23. Select DRUG, then *, then DEPL to construct the DRUG*DEPL interaction. Select OK, then Goback.

  24. Select Analysis type, then Repeated measures, then Factor names and levels. The Repeated measures Factors window appears.

  25. 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.

  26. Select Factor Values. The Repeated measures Factor Levels window appears.

  27. 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.

  28. 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.

  29. Select Polynomial, then OK.

  30. Select Options. The Repeated Measures Options window appears.

  31. Select Test within-subject effects to produce an analysis-of-variance table for each contrast defined by the within-subject factors. Select OK.

  32. Select Goback three times to return to the Analysis of Variance window.

  33. Select Submit from the Run menu. The results of the analysis appear in the Output window.

  34. If desired, compare these results to those in Example 7 in "The GLM Procedure" chapter of SAS/STAT User's Guide.


Chapter Contents

Previous

Next

Top of Page

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