- SAS - Dates & Times
- SAS - Macros
- SAS - Input Methods
- SAS - Functions
- SAS - Decision Making
- SAS - Loops
- SAS - Operators
- SAS - Numeric Formats
- SAS - Arrays
- SAS - Strings
- SAS - Variables
- SAS - Data Sets
- SAS - Basic Syntax
- SAS - Program Structure
- SAS - User Interface
- SAS - Environment
- SAS - Overview
- SAS - Home
SAS Data Set Operations
- SAS - Simulations
- SAS - Output Delivery System
- SAS - SQL
- SAS - Format Data Sets
- SAS - Sort Data Sets
- SAS - Subsetting Data Sets
- SAS - Merging Data Sets
- SAS - Concatenate Data Sets
- SAS - Write Data Sets
- SAS - Read Raw Data
SAS Data Representation
SAS Basic Statistical Procedure
- SAS - Hypothesis Testing
- SAS - One-Way Anova
- SAS - Repeated Measure Analysis
- SAS - Fishers Exact Tests
- SAS - Chi-Square
- SAS - Bland-Altman Analysis
- SAS - Linear Regression
- SAS - Correlation Analysis
- SAS - T Tests
- SAS - Cross Tabulations
- SAS - Frequency Distributions
- SAS - Standard Deviation
- SAS - Arithmetic Mean
SAS Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
SAS - One Way Anova
ANOVA stands for Analysis of Variance. In SAS it is done using PROC ANOVA. It performs analysis of data from a wide variety of experimental designs. In this process, a continuous response variable, known as a dependent variable, is measured under experimental conditions identified by classification variables, known as independent variables. The variation in the response is assumed to be due to effects in the classification, with random error accounting for the remaining variation.
Syntax
The basic syntax for applying PROC ANOVA in SAS is −
PROC ANOVA dataset ; CLASS Variable; MODEL Variable1 = variable2 ; MEANS ;
Following is the description of the parameters used −
dataset is the name of the dataset.
CLASS gives the variables the variable used as classification variable.
MODEL defines the model to be fit using certain variables from the dataset.
Variable_1 and Variable_2 are the variable names of the dataset used in analysis.
MEANS defines the type of computation and comparison of means.
Applying ANOVA
Let us now understand the concept of applying ANOVA in SAS.
Example
Lets consider the dataset SASHELP.CARS. Here we study the dependence between the variables car type and their horsepower. As the car type is a variable with categorical values, we take it as class variable and use both these variables in the MODEL.
PROC ANOVA DATA = SASHELPS.CARS; CLASS type; MODEL horsepower = type; RUN;
When the above code is executed, we get the following result −
Applying ANOVA with MEANS
Let us now understand the concept of applying ANOVA with MEANS in SAS.
Example
We can also extend the model by applying the MEANS statement in which we use Turkey s Studentized method to compare the mean values of various car types.The category of car types are psted with the mean value of horsepower in each category along with some additional values pke error mean square etc.
PROC ANOVA DATA = SASHELPS.CARS; CLASS type; MODEL horsepower = type; MEANS type / tukey pnes; RUN;
When the above code is executed, we get the following result −
Advertisements