One-way ANOVA using SAS

 

Still use mpg data, and say we wish to test whether mean of highway mpg (hwy) between the cars with different number of cylinders (cyl). There are multiple procedures in SAS to use, from PROC GLM to PROC GLIMMIX. So let use proc glm and proc glimmix as example:

proc glm data = mpg;
  class cyl;
  model hwy = cyl;
  means cyl;
run;

SAS one way anova 1SAS one way anova 2

 

proc glm data = mpg;
  class cyl;
  model hwy = cyl;
  means cyl;
run;

SAS one way anova 3The mean of the dependent variable differs significantly among the levels of cyl.  The glimmix procedure also gives pair-wise comparison result.

 

 

See Also:

Do the same test in R

Leave a Reply

Your email address will not be published. Required fields are marked *