Programming the statistical procedures from SAS

CART method in SAS

Reply
Occasional Contributor
Posts: 5

CART method in SAS

Dear Group,

i am attempting a classification tree for a medical outcome. both the outcome variable and independent variables are binary.

 

my tree looks like it is reading the program as if it is  a continuous independent variable (but it's actually 0|1).  For example, there are input values of 0.10 and 0.01.  i do not understand that, and the SAS example i read on line for classification trees show different outputs.

Does any one have some  idea of what could be going on here?  Also, was expecting a chi sq or p value. (?)

MY code:

data pam.inhib;
proc hpsplit data=pam.copyinhib;
class inhibition;
model inhibition =
acephate chlorpyrifos ddvp diazinon dimethoate methomyl mevinphos carbaryl carbofuran oxydemeton_methyl handler;
grow chaid;
run;

 

i've attached the tree

 

THANK YOU!

best, pam

Super User
Posts: 23,771

Re: CART method in SAS

There's a lot of output there, can you specify the output that shows you have an issue, page and table/graph perhaps?

Specifically related to:

 

my tree looks like it is reading the program as if it is  a continuous independent variable (but it's actually 0|1).  For example, there are input values of 0.10 and 0.01.  i do not understand that, and the SAS example i read on line for classification trees show different outputs.

SAS Employee
Posts: 386

Re: CART method in SAS

All of the predictor variables are considered as continuous unless you also specify them in the CLASS statement. See the descriptions of the CLASS and MODEL statements in the PROC HPSPLIT documentation.

Occasional Contributor
Posts: 5

Re: CART method in SAS

Posted in reply to StatDave_sas

got it, great!!

 

thank you very much.

pam

Highlighted
Occasional Contributor
Posts: 5

Re: CART method in SAS

Posted in reply to StatDave_sas

Hi Reeza,

 

thanks for reaching back. The problem is fixed (it was the class statement).

 

i am new to this.  i see that SAS is splitting the tree only once now that i've fixed that statement.   my new question: is there a way to ask SAS to make more than one split?

best, pam

Ask a Question
Discussion stats
  • 4 replies
  • 191 views
  • 2 likes
  • 3 in conversation