From the course: Advanced SAS Programming for R Users, Part 1

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

ANOVA and ANCOVA with the general linear model procedure

ANOVA and ANCOVA with the general linear model procedure - SAS Tutorial

From the course: Advanced SAS Programming for R Users, Part 1

ANOVA and ANCOVA with the general linear model procedure

- [Narrator] Now we're going to to move on from PROC REG and now into PROC GLM, which stands for general linear model. In this case, we're going to perform an ANOVA and also an analysis of covariance. We're moving away from PROC REG with just continuous variables and now we can use classification variables in PROC GLM. Here I'm going to continue working with the ameshousing dataset. To do an analysis of variance, I'm going to choose heating_qc, for quality control in that dataset. This has four levels: excellent, good, average, and fair. To tell SAS explicitly that's it a classification variable, I'm going to use the CLASS statement and specify the variable heating quality control. So the CLASS statement is identical to the as.factor function in R. It's going to create a column in the design matrix for each classification level. And as an option in parentheses, I'm going to specify the reference level. In this case, I'll set it equal to Fa for Fair. And again, that is case sensitive…

Contents