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

I trying to run example code provided for Proc HPSPLIT but getting an error.  Here is the code:

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;
   output out=hpsplout;
run;

And here is the log with error:
109 proc hpsplit data=sashelp.baseball seed=123;
110 class league division;
111 model logSalary = nAtBat nHits nHome nRuns nRBI nBB
112 yrMajor crAtBat crHits crHome crRuns crRbi
113 crBB league division nOuts nAssts nError;
114 output out=hpsplout;
           ---
            22
            76
ERROR 22-322: Syntax error, expecting one of the following: ;, /, GROWTHSUBTREE, IMPORTANCE, PRUNESUBTREE.
ERROR 76-322: Syntax error, statement will be ignored.

Here is a Page Link to the SAS documentation where I got this example code: https://documentation.sas.com/?docsetId=stathpug&docsetTarget=stathpug_code_hpsplex3.htm&docsetVersi...

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

This probably indicates that your version is too old and does not support this syntax yet.

See this link for an earlier syntax http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.357.3889&rep=rep1&type=pdf (page 318).

View solution in original post

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

This probably indicates that your version is too old and does not support this syntax yet.

See this link for an earlier syntax http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.357.3889&rep=rep1&type=pdf (page 318).

Bill_H
Calcite | Level 5
Thanks Chris, I think you are right, sounds like I should upgrade to latest version!
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 921 views
  • 1 like
  • 2 in conversation