//
//Regression Tree
// 
//This tree is used to regression continuous target by tree using minimize variance.
//

//Syntax  
//Quation this systax is same as dicsion tree.
tree target by x y z/
(options)
;

//Options
test=nn      //Share(%) of Test data
make=nn      //Share(%) of Instruction data
terminal=nn  //num of minimum leaf node size
outsort=xx   //output ordering maxmum prediction  /ON/OFF/1/0
variable=xx  //type of explanable variable        /code/continuous/moji/zero/char

//Example visitor probabiltiy by directmail ancates and profile of customer.
get dmdatKNJ.csv@; 

//Execute AIC ranking table according to cross refference the target and explanable variables. cross def by old area dm1 dm2 dm3 dm4 dm5 income work home workspan homespan gender family job amount;

//Execute regression tree explanable variables. //This regression target is a continuous variable instead of categorical variable. //This example infers the amount of home value by direct answers and customer profiles. tree amount by income old area work home by explanable variables by tree. workspan homespan gender family job/ target/continuous terminal=20 ; anaput ana1;

//View paraite result figure. get ans1; plot bar mean by node/ xrotate=90 ;

//View paraite result figure. get ans1; plot line distincRate by countRate;