BookmarkSubscribeRSS Feed
TerryWhitlock
Calcite | Level 5

I am working on a regression model but I'd like to get the relative importance or contribution percentages from all possible orderings of the predictors.  Similar to an example output below of predictor variables to a target variable.

 

I've seen the relaimpo package in R...does SAS have a similar code/function that can give the contribution percentage of predictors to a target variable?

 

Easy_Reservation

7.3%

Preferred_Seats

5.9%

Flight_Options

5.1%

Ticket_Prices

5.3%

Seat_Comfort

9.2%

Seat_Roominess

7.5%

Overhead_Storage

6.3%

Clean_Aircraft

8.4%

Courtesy

9.2%

Friendliness

11.6%

Helpfulness

12.1%

Service

12.1%

6 REPLIES 6
Damo
SAS Employee

Hi @TerryWhitlock

 

It's the first time I hear about relaimpo, just to give you an idea of my expertise on that field...Smiley Very Happy

But from SAS, using the SAS/IML module you can execute R code as long as you have the RLANG option "on" (default value is norlang).

 

Then , with the PROC IML you can directly use your R code.

Further details (including comments from Chris Hemedinger and Rick_SAS) and a sample code are available from Run R code inside SAS easily.

 

Hope that helps.

 

Cheers,

Damo

 

Ksharp
Super User

You could do Decision Tree Regression.

And the output contain what you want.

 

Check

PROC HPSPLIT 

ChrisHemedinger
Community Manager

Just to expand on the response from @Ksharp, here's a link to the HPSPLIT documentation.  And example of the graphical output:

 

hpsplit.png

 

PROC HPSPLIT is part of SAS/STAT, but it's not included as part of SAS University Edition.  Since it's in a category of "high performance" procedures, it's not part of that learners bundle.  

 

You might also be interested in this free "Ask the Expert" webinar about variable selection in SAS Enterprise Guide and SAS Enterprise Mi....

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
TerryWhitlock
Calcite | Level 5

Chris/KSharp
Thank you for pointing me to HPSPLIT function!

 

Just to help me in usage of the outputs on HPSPLIT...if the image below is my output.  Would it be a fair interpretation that Growth is 37% percent of total, Dopant is 26% percent of total, Anneal Temp is 23% percent of total, Rotation is 12% percent of total in importance to target variable?

 

HPSPLIT.png

 

 

 

 

 

Ksharp
Super User

I think you can say so. But I am not 100% certain .

The following is I quote from your example.

 

"This table shows that the predictor gTemp has the largest value. This means that the growth temperature of
substrate is the most important consideration in determining the usability of the sample."

StatDave
SAS Super FREQ

Effect importance is typically assessed using partial correlation and partial R-square. If the target response is binary, see this note. If the target is continuous and you are fitting an ordinary regression model, see this note which shows how to get cumulative R-square. Partial R-square for generalized models can be computed as discussed in this note

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 6 replies
  • 2668 views
  • 2 likes
  • 5 in conversation