BookmarkSubscribeRSS Feed
samkelomotsa
Fluorite | Level 6

When doing an analysis of variance we assume that the data meet the assumptions of ANOVA. we even use the Levene's test of homogeneity of variances to test such. 

assuming that I have done a test of Homogeneity of (age at first egg) AFE Variance and received the output below from the Levens and Welch test respectively. 

 

Levene's Test for Homogeneity of AFE Variance
ANOVA of Squared Deviations from Group Means

Source

DF

Sum of Squares

Mean Square

F Value

Pr > F

genotype

6

21146861

3524477

4.30

0.0003

Error

411

3.3714E8

820285

 

 

 

Because of significant differences between variable group means I then proceeded to the welch test results and they’re presented here:

Welch's ANOVA for AFE

Source

DF

F Value

Pr > F

genotype

6.0000

33.08

<.0001

Error

110.4

 

 

 

What is the next step now? do I just report the results of the welch test instead of the ANOVA results?

 

3 REPLIES 3
Ksharp
Super User
 
/*What code are you using? Like this : */
proc glm data=sashelp.heart(obs=1000);
class bp_status;
model weight=bp_status/solution;
means bp_status/hovtest;
ods output HOVFTest=HOVFTest OverallANOVA=OverallANOVA;
quit;

 

 

If  a test of Homogeneity of  Variance is significant(a.k.a  P value <0.05 ),that means Variance from different groups is different, or means you could not do ANOVA for this data.

But You could try non-parameter version of ANOVA (a.k.a  Kruskal-Wallis Test)

proc npar1way data=dataset ;  
class treat;
var var;
output out=WILCOXON_ANOVA  WILCOXON ;
run;

Also @StatDave   @SteveDenham @lvm  could give you better code / idea .

samkelomotsa
Fluorite | Level 6

Thank you so much let me try.

jorgecarballo93
Calcite | Level 5

¡Hola!

Gracias por compartir tu análisis y tus preguntas sobre la prueba de homogeneidad de varianzas y el test de Welch en ANOVA. Basándome en los resultados que has mostrado, parece que has hecho un buen trabajo al verificar la homogeneidad de las varianzas con la prueba de Levene y luego proceder al test de Welch debido a las diferencias significativas entre las medias de los grupos.

El siguiente paso después de obtener los resultados del test de Welch sería reportar esos resultados en lugar de los de la ANOVA estándar, ya que el test de Welch es más apropiado cuando las varianzas no son homogéneas. Específicamente, debes destacar el valor F y el valor p del test de Welch, ya que estos son los indicadores de si existen diferencias significativas entre los grupos.

Además, si te interesa profundizar en cómo implementar y interpretar la T de Welch en SAS, te invito a leer mi artículo titulado "Implementación en SAS de la T de Welch" en mi página web SAS desde Cero. En este artículo, explico detalladamente cómo llevar a cabo este análisis en SAS y cómo interpretar los resultados. Espero que encuentres útil esta información para tu análisis.

 

Puedes leer el artículo completo aquí: https://www.sasdesdecero.com/implementacion-en-sas-de-la-t-de-welch/

 

¡Espero que esto te ayude y mucho éxito con tu análisis!

Saludos,

Jorge Carballo

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 929 views
  • 3 likes
  • 3 in conversation