Hello!
I am trying to create a decision tree in SAS v9.4 (TS1M1) using PROC HPSPLIT. This is an entirely new procedure for me and it's a little daunting. Any help is greatly appreciated!!
My outcome is a binary group, and I have a few binary predictors. The model will run, but the output is not what I expected. I get line-by-line output, with nodes all out of order. I am struggling to make sense of it. I was expecting a nice decision tree. Is it because of the version of SAS I am using?
Also - is there a way to get sensitivity, specificity from this procedure?
Thanks so much!!!
PROC HPSPLIT DATA=ads plots=all maxdepth=7 maxbranch=2 ;
CLASS group race_white asa12 anes_type_gen surg_type male ;
MODEL group= race_white asa12 anes_type_gen surg_type male;
grow gini;
prune gini;
rules file='&path.\test.rtf';
run;
Have you already tried the examples in the documentation?
I would suggest working through the examples in the documentation first and understand what's happening there and then working on your own data.
Most PROCs have a decent example section:
Code specifically:
https://documentation.sas.com/api/docsets/statug/15.1/content/statug_code_hpsplex1.htm?locale=en
@tka726 wrote:
Hello!
I am trying to create a decision tree in SAS v9.4 (TS1M1) using PROC HPSPLIT. This is an entirely new procedure for me and it's a little daunting. Any help is greatly appreciated!!
My outcome is a binary group, and I have a few binary predictors. The model will run, but the output is not what I expected. I get line-by-line output, with nodes all out of order. I am struggling to make sense of it. I was expecting a nice decision tree. Is it because of the version of SAS I am using?
Also - is there a way to get sensitivity, specificity from this procedure?
Thanks so much!!!
PROC HPSPLIT DATA=ads plots=all maxdepth=7 maxbranch=2 ;
CLASS group race_white asa12 anes_type_gen surg_type male ;
MODEL group= race_white asa12 anes_type_gen surg_type male;
grow gini;
prune gini;
rules file='&path.\test.rtf';run;
It is really worth upgrading to a more recent version of HPSPLIT. Especially for the graphs.If I recall correctly, the version you are using doesn't produce any graph. Check out the most recent doc to see what it does now.
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 25. 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.