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

I was doing my homework for the statistical assignments from a university course. There is an exercise for us to construct a regression tree for the given data. However, it failed in my SAS when I was trying to use the HPSPLIT procedure. I had no idea what was happening. I was also trying to use the sample code for testing the procedure, which is available on the official website (http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_...) but it only output the following results and didn't provide anything more, e.g., the regression tree of my interest.

 

ods graphics on;

proc hpsplit data=sashelp.baseball seed=123;
   class league division;
   model logSalary = nAtBat nHits nHome nRuns nRBI nBB
                     yrMajor crAtBat crHits crHome crRuns crRbi
                     crBB league division nOuts nAssts nError;
run;

屏幕快照 2018-11-19 21.27.59.png

 

How could this happen?

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

When I run your code exactly as it is, without any changes, I get a different set of NOTES at the end of the procedure, and I get the desired decision tree.

 

NOTE: The ASSIGNMISSING= option has not been specified.  Because of this, all observations with missing values in the explanatory variables will be
      excluded from tree construction.
NOTE: The HPSPLIT procedure is executing in single-machine mode.
NOTE: Cross-validating using 10 folds.
NOTE: There were 322 observations read from the data set SASHELP.BASEBALL.
NOTE: PROCEDURE HPSPLIT used (Total process time):
      real time           7.34 seconds
      cpu time            4.93 seconds

 

Why? I don't know. I think you might want to contact SAS Technical Support.

 

What is the exact version NUMBER of your SAS installation?

 

In the future, when you need to present a SASLOG here in the SAS communities, copy the SASLOG text and paste the text into the {i} window. 

--
Paige Miller

View solution in original post

8 REPLIES 8
PaigeMiller
Diamond | Level 26

Are there error messages or warning messages in the SASLOG? If so, show us the SASLOG.

 

Also, did you turn on ODS GRAPHICS? (Might be on by default...)

 

ods graphics on;
--
Paige Miller
fanwayne
Fluorite | Level 6
Three is no error message or warning message in the SASLOG. So it looks very strange to me. I confirm that I've turned on ODS GRAPHICS. Other procedure can produce nice plots, such as REG, GLM and so on.

The SASLOG was shown as follows:
NOTE: The HPSPLIT procedure is executing in single-machine mode.
NOTE: There were 322 observations read from the data set SASHELP.BASEBALL.
NOTE: PROCEDURE HPSPLIT used (Total process time):
real time 0.07 seconds
cpu time 0.09 seconds

PaigeMiller
Diamond | Level 26

When I execute your code, I get a full decision tree graphic.

 

Please show us the entire SASLOG.

--
Paige Miller
fanwayne
Fluorite | Level 6

The entire log has been provided. It didn't show any error or warning messasge.

Is there any special settings needed for this procedure, or perhaps anything wrong with my SAS installation?

 

屏幕快照 2018-11-19 22.07.19.png

PaigeMiller
Diamond | Level 26

When I run your code exactly as it is, without any changes, I get a different set of NOTES at the end of the procedure, and I get the desired decision tree.

 

NOTE: The ASSIGNMISSING= option has not been specified.  Because of this, all observations with missing values in the explanatory variables will be
      excluded from tree construction.
NOTE: The HPSPLIT procedure is executing in single-machine mode.
NOTE: Cross-validating using 10 folds.
NOTE: There were 322 observations read from the data set SASHELP.BASEBALL.
NOTE: PROCEDURE HPSPLIT used (Total process time):
      real time           7.34 seconds
      cpu time            4.93 seconds

 

Why? I don't know. I think you might want to contact SAS Technical Support.

 

What is the exact version NUMBER of your SAS installation?

 

In the future, when you need to present a SASLOG here in the SAS communities, copy the SASLOG text and paste the text into the {i} window. 

--
Paige Miller
fanwayne
Fluorite | Level 6

OK, thanks for your reminder. The SAS version is 9.4 (TS1M2)

fanwayne
Fluorite | Level 6
I have asked other members in our department about this issue. It seems that I need a updated version of SAS to run this procedure. I have decided to install an updated version of SAS. Thanks for your answers.
PaigeMiller
Diamond | Level 26

@fanwayne wrote:
I have asked other members in our department about this issue. It seems that I need a updated version of SAS to run this procedure. I have decided to install an updated version of SAS. Thanks for your answers.

I'd have to disagree with this. We have people running SAS 9.4 TS1M2 who get decision tree graphics from PROC HPSPLIT.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 8 replies
  • 2009 views
  • 0 likes
  • 2 in conversation