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
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;
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;
I moved the question to the Statistical Procedures community.
"Community Matters" is for topics concerning the working of the Communities website.
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!
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.