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

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

1 ACCEPTED SOLUTION

Accepted Solutions
MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

View solution in original post

6 REPLIES 6
MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
CharlesC
Calcite | Level 5

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.


MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
CharlesC
Calcite | Level 5

Thanks again!!

SteveDenham
Jade | Level 19

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

PGStats
Opal | Level 21

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

PG

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!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1228 views
  • 6 likes
  • 4 in conversation