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

Hi, 

I know that the following is applicable for equal variance levene's test. 

 

Proc glm data=want;

   class age;

   model y=age;

   means age / hovtest;

run;

 

But if I have two variables with interaction term, what will be the code for levene's test? I tried the following but it didn't work.

 

Proc glm data=want;

   class age sex;

   model y=age sex age*sex;

   means age sex age*sex/ hovtest;

run;

 

Please help

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

The documentation states "Note that this option is ignored unless your MODEL statement specifies a simple one-way model.

 

You may test the homogeneity of variance across all combined classes by creating a new variable:

 

data heartTest;
set sashelp.heart;
if cmiss(smoking, sex) = 0 then smokeSex = cats(smoking, sex);
run;

proc glm data=heartTest plots=none;
class smokeSex;
model cholesterol = smokeSex;
means smokeSex / hovtest=bf;
run;
PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

The documentation states "Note that this option is ignored unless your MODEL statement specifies a simple one-way model.

 

You may test the homogeneity of variance across all combined classes by creating a new variable:

 

data heartTest;
set sashelp.heart;
if cmiss(smoking, sex) = 0 then smokeSex = cats(smoking, sex);
run;

proc glm data=heartTest plots=none;
class smokeSex;
model cholesterol = smokeSex;
means smokeSex / hovtest=bf;
run;
PG
abdulla
Pyrite | Level 9
Hey PG you are awesome. Thanks a lot

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 1550 views
  • 1 like
  • 3 in conversation