Tham khảo tài liệu 'cookbook modeling data for marketing_2', khoa học xã hội, kinh tế chính trị phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Page 88 Segmentation Some analysts and modelers put all continuous variables into segments and treat them as categorical variables. This may work well to pick up nonlinear trends. The biggest drawback is that it loses the benefit of the relationship between the points in the curve that can be very robust over the long term. Another approach is to create segments for obviously discrete groups. Then test these segments against transformed continuous values and select the winners. Just how the winners are selected will be discussed later in the chapter. First I must create the segments for the continuous variables. In our case study I have the variable estimated income inc_est3 . To determine the best transformation and or segmentation I first segment the variable into 10 groups. Then I will look at a frequency of est_inc3 crossed by the dependent variable to determine the best segmentation. An easy way to divide into 10 groups with roughly the same number of observations in each group is to use PROC UNIVARIATE. Create an output data set containing values for the desired variable inc_est3 at each tenth of the population. Use a NOPRINT option to suppress the output. The following code creates the values appends them to the original data set and produces the frequency table. proc univariate data noprint weight smp_wgt var inc_est3 output out incdata pctlpts 10 20 30 40 50 60 70 80 90 100 pctlpre inc run data set if _n_ eq 1 then set incdata retain inc10 inc20 inc30 inc40 inc50 inc60 inc70 inc80 inc90 inc100 run data set if inc_est3 inc10 then incgrp10 1 else if inc_est3 inc20 then incgrp10 2 else if inc_est3 inc30 then incgrp10 3 else if inc_est3 inc40 then incgrp10 4 else if inc_est3 inc50 then incgrp10 5 else if inc_est3 inc60 then incgrp10 6 else if inc_est3 inc70 then incgrp10 7 else if inc_est3 inc80 then incgrp10 8 else if inc_est3 inc90 then incgrp10 9 else incgrp10 10 run Page 89 proc freq .