linear-models

Getting Started

To demonstrate the various types of sums of squares, we’ll create a data frame called df_disease taken from the SAS documentation.

The Model

For this example, we’re testing for a significant difference in stem_length using ANOVA.

proc glm;
   class drug disease;
   model y=drug disease drug*disease;
run;

Sums of Squares Tables

SAS has four types of sums of squares calculations. To get these calculations, the sum of squares option needs to be added (/ ss1 ss2 ss3 ss4) to the model statement.

proc glm;
   class drug disease;
   model y=drug disease drug*disease / ss1 ss2 ss3 ss4;
run;

Type I

Type II

Type III

Type IV