# How to Perform Two-Way ANOVA in SAS

Nikki Kamouneh

Posted on
ANOVA f test SAS Two-Way

This tutorial is going to take the theory learned in our Two-Way ANOVA tutorial and walk through how to apply it using SAS. We will be using the Moore dataset, which can be downloaded from our GitHub repository.

This data frame consists of subjects in a “social-psychological experiment who were faced with manipulated disagreement from a partner of either of low or high status. The subjects could either conform to the partner’s judgment or stick with their own judgment.” (John Fox, Sanford Weisberg and Brad Price (2018). carData: Companion to Applied Regression Data Sets. R package version 3.0-2. https://CRAN.R-project.org/package=carData).

We are interested in exploring an individuals conformity based on their partner’s status:

• Low Status
• High Status

We are also interested in exploring whether their F-score category (a measure of authoritarianism) affects outcomes or interacts with partner status. Our three treatment levels are:

• Low F-score
• Medium F-score
• High F-score

Our sample size is $$N = 45$$. First, let’s inspect the data for outliers or funky distributions. The following boxplot shows the distribution of scores on the conformity variable within each combination of partner_status and fcategory. We will use the following code:

proc sgplot data=moore;
vbox conformity / category=fcategory group=partner_status;
xaxis values=('low' 'medium' 'high')
run;

We get this figure: