Hello,
I am writing a program and all I want is the Levene's Test statistic in PROC GLM-- I don't need the rest of the output. Is there any way to just extract the Levene's test or suppress everything but the Levene's test? Thanks for any help you could give!
-Charles
Hi Charles,
Use the ods select HOVFTest; statement before your PROC GLM code. Be sure to then reset your ODS select to all afterwards.
ods select HOVFTest; proc glm data=sashelp.cars; class make; model weight=make; means make / hovtest; run; quit; ods select all;
Hope this helps.
Cheers,
Michelle
Hi Charles,
Use the ods select HOVFTest; statement before your PROC GLM code. Be sure to then reset your ODS select to all afterwards.
ods select HOVFTest; proc glm data=sashelp.cars; class make; model weight=make; means make / hovtest; run; quit; ods select all;
Hope this helps.
Cheers,
Michelle
Thank you, that worked perfectly! If I wanted to just select the parametric estimates table with the variance inflation factor and my proc reg code looked like this:
REG DATA=&userdata.;
Linear_Regression_Model: MODEL x2 = x3 x4 x5 x6 x7
/VIF;
RUN;
QUIT;
what is the name of the ods output? VIF? How are you be able to tell what the name of a table in SAS output is?
Thanks again.
You would specify ods trace on; before your proc glm and ods trace off; afterwards and then check the log for the name of the ods table.
For example...
ods trace on; proc reg data=sashelp.class; model weight=height /vif; run; quit; ods trace off;
And in the log you will see the names of the ods tables, so the ParameterEstimates contains the VIF.
Cheers,
Michelle
Thanks again!!
Micelle's answer will (almost) always give you the table names, but the documentation also lists the ODS Table Names, along with required statements or options, under the Details tab.
Steve Denham
Use ODS to extract only the statistic you want. Terminate your GLM step by the statements :
proc glm .....
....
MEANS ... / HOVTEST=LEVENE;
...
ods select none;
ods output HOVFTest = ht( where=(probf is not missing) keep=fvalue probf );
run;
ods select all;
quit;
Dataset ht will contain the F value and probability of Levene's test.
PG
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.