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;
How could this happen?
Many thanks.
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.
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;
When I execute your code, I get a full decision tree graphic.
Please show us the entire SASLOG.
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?
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.
OK, thanks for your reminder. The SAS version is 9.4 (TS1M2)
@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.
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!
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.