BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rossanaperedo
Fluorite | Level 6

Hi, 

I am trying to test homogeneity for a two way ANOVA, (linearity assumption was alreay verified), but It doesn't work, I read that Levene's test is only for one way ANOVA 

 

PROC GLM DATA=clus_ConHR;
CLASS Cluster agegroup;
MODEL vitesse_trt = Cluster agegroup Cluster*agegroup;
means Cluster*agegroup/ HOVTEST=levene(type=ABS);
run;
quit;

 

How should I test homogeneity using SAS in this model? Should I construct a plot with the residuals? 

1 ACCEPTED SOLUTION

Accepted Solutions
rossanaperedo
Fluorite | Level 6

I was trying to test homogeneity of variance by looking at the distributions. I found this solution:

 


PROC glm DATA=clus_ConHR;
CLASS Cluster agegroup;
MODEL fct_executive = Cluster agegroup Cluster*agegroup;
output out = residus p=predit rstudent=rstudent;
run;
quit;

Proc gplot data = residus;
plot rstudent* (predit);
run;

 

Thank you

View solution in original post

6 REPLIES 6
Ksharp
Super User

Can you try LSMEANS statement ?

And your design is balanced or not balanced ?

rossanaperedo
Fluorite | Level 6

Lsmeans didn't gave me the results that I need to test homogeneity. Thank you anyway. 

Rick_SAS
SAS Super FREQ

Not clear if you want a statistical test or a graph that enables you to visually check distributions.  For a graph, try using the EFFECTPLOT statement:

 

proc genmod DATA=clus_ConHR;
CLASS Cluster agegroup;
MODEL vitesse_trt = Cluster agegroup Cluster*agegroup
effectplot box / cluster;
run;

For details and a discussion, see "Visualize an ANOVA with two-way interactions."

rossanaperedo
Fluorite | Level 6

I was trying to test homogeneity of variance by looking at the distributions. I found this solution:

 


PROC glm DATA=clus_ConHR;
CLASS Cluster agegroup;
MODEL fct_executive = Cluster agegroup Cluster*agegroup;
output out = residus p=predit rstudent=rstudent;
run;
quit;

Proc gplot data = residus;
plot rstudent* (predit);
run;

 

Thank you

Hydro1
Fluorite | Level 6

Although the graphics (expecially boxplots) are useful in assessing homogeniety of variance across groups in a 2-way ANOVA, I am looking for a statistical test that can be applied ?  Most of what I have seen only applies to 1-way ANOVA ?

 

Thanks for your help!

Rick_SAS
SAS Super FREQ

For a discussion of two-way tests of homogeneity of variance, see the examples  and discussion at 

http://www.stat.wmich.edu/wang/664/egs/SASsoybean.html

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 7133 views
  • 1 like
  • 4 in conversation