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

Hi all,

I try to run hpforest below and keep having errors.

Does anyone know the reason?

Thank you!

Hao

 

proc hpforest data= TEMP5;

target lsm_2/level=binary ;

input HtInInches bmi/level= interval ;

input  gender/level=nominal  ;

run;

 

 

NOTE: The HPFOREST procedure is executing in single-machine mode.

NOTE: HPFOREST TRACE line 1035 file 14

NOTE: HPFOREST TRACE line 942 file 13

ERROR: Nominal target has a single category.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: There were 288 observations read from the data set WORK.TEMP5.

NOTE: PROCEDURE HPFOREST used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds]

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

I've never used HPFOREST, but it appears you are defining the target variable as binary. You can check to see if it contains both 0 and 1 values like this:

proc freq data = TEMP5;
  table lsm_2;
run;

 

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

I've never used HPFOREST, but it appears you are defining the target variable as binary. You can check to see if it contains both 0 and 1 values like this:

proc freq data = TEMP5;
  table lsm_2;
run;

 

haoduonge
Quartz | Level 8

You are right.

I recoded it and made error from coding.

Thanks!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—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
  • 2 replies
  • 1209 views
  • 1 like
  • 2 in conversation