Hi, I am trying to produce decision trees using proc SGSplit. For each tree I would like ONLY the zoomed decision tree and the nodes=summary table.
I would like the tree image on 1 tab and the nodes=summary table on the next tab in the excel file.
Problem is, HPSplit produces a load of tables and graphs i dont want output into excel.
I have found a way of exporting only the zoomed tree graph (plots(only)=zoomedtree) however I cant find a way of exporting/printing just the 1 table i am interested in.
Does anyone have any advice? I have started playing with ods exclude and output options but am not having any luck so far!
ods excel file="xyz.xlsx"; /*ods EXCLUDE all;*/ ods graphics on / width=1000px; proc hpsplit data=Tree1 seed=52892 assignmissing=branch nodes=summary plots(only)=zoomedtree; class x y z; model x (event='1') = x y z a b c; grow chisquare; prune costcomplexity; /*ods ouput summary;*/ run;
ods excel close;
Hello,
You need to use ODS SELECT statement before (just in front of) PROC HPSPLIT to define the output objects you want to have in the displayed output.
You can also use the ODS EXCLUDE statement to suppress some.
If you want to know about the ODS Table Names of your output objects, go to the
documentation of the PROC > Details > ODS Table Names, or put :
ODS TRACE ON; (ODS Table Names are then published in the LOG) --> then run your PROC.
Pick the Names you want and put them in your ODS SELECT open-code statement before PROC HPSPLIT.
The opposite is:
ODS TRACE OFF;
Koen
Hello,
You need to use ODS SELECT statement before (just in front of) PROC HPSPLIT to define the output objects you want to have in the displayed output.
You can also use the ODS EXCLUDE statement to suppress some.
If you want to know about the ODS Table Names of your output objects, go to the
documentation of the PROC > Details > ODS Table Names, or put :
ODS TRACE ON; (ODS Table Names are then published in the LOG) --> then run your PROC.
Pick the Names you want and put them in your ODS SELECT open-code statement before PROC HPSPLIT.
The opposite is:
ODS TRACE OFF;
Koen
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!
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.