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

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;
1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

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

View solution in original post

1 REPLY 1
sbxkoenk
SAS Super FREQ

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 594 views
  • 1 like
  • 2 in conversation