10/28/2013 1
Using Proc Logistic to Improve Customer Retention
Luke Furlong Assurant Health
Reference
- SAS Course: Survival Data Mining: Predictive
Using Proc Logistic to Improve Customer Retention Luke Furlong - - PDF document
10/28/2013 Using Proc Logistic to Improve Customer Retention Luke Furlong Assurant Health Reference SAS Course: Survival Data Mining: Predictive Hazard Modeling for Customer History Data. Will Potts. 1 10/28/2013 The Problem Assurant
Policy issued Submit claim (office visit) Submit second claim (ER visit) Cancel Policy Call
1 2 3 4 5 6 7 8 9 10 11 Lapse Rate Month Modeled lapse rates by Billing type
List Bill Direct Bill Other Billing Type
%LET KNOTS=2 3 5; DATA IM_HIST_RET; SET IM_HIST_RET; ARRAY K{3} _TEMPORARY_ (&KNOTS); CSB1=(T>K[1])*(T-K[1])**3-T**3+3*K[1]*T**2-3*K[1]**2*T; CSB2=(T>K[2])*(T-K[2])**3-T**3+3*K[2]*T**2-3*K[2]**2*T; CSB3=(T>K[3])*(T-K[3])**3-T**3+3*K[3]*T**2-3*K[3]**2*T; RUN;
Policy Product type 1 Value 2 Value 3 Fundamentals 4 Enhanced Policy Call Type Call date 2 Admin 1/2/2012 2 Service 5/3/2011 3 Admin 3/9/2012 4 Service 4/23/2012 Policy Data Call Data
Member Month Call Claim Lapse 1 1 1 $3000 1 2 1 3 1 1 4 1 2 1 1 $5000 2 2 3 1 $150 3 2 1 3 3 3 4 1
ODS OUTPUT PARAMETERESTIMATES=PE;/* use this output for plotting*/ /*Model Estimation*/ proc logistic data=HA_LAPS.IM_HIST_RET OUTMODEL=SASUSER.AHA_LAPS_MODEL_VAL; model DUR_LAPSE(event='1')= POL_DUR_MTH CSB1 CSB2 CSB3 LIST_BILL CREDIT_CARD COM T*COM T*LISTBILL T*CREDITCARD; RUN; /*Scoring*/ proc logistic inmodel=sasuser.AHA_LAPS_MODEL_VAL; score data=IM_HIST_RET out=Score_FUND; run;
1 2 3 4 5 6 7 8 9 10 11 Lapse Rate Month Modeled lapse rates by Billing type
List Bill Direct Bill Other Billing Type
DATA _NULL_; /*Creates a text file*/ FILE '\\Msp0wsasp001\prod5\AA\HA Lapse Drivers Luke 2012 Q4\model2.txt'; IF _N_=1 THEN DO; ARRAY K{3} _TEMPORARY_ (&KNOTS); put 'csb1=(t>' k[1] ')*(t-' k[1] ')**3-t**3+3*' k[1] '*t**2-3*' k[1] '**2*t;'; put 'csb2=(t>' k[2] ')*(t-' k[2] ')**3-t**3+3*' k[2] '*t**2-3*' k[2] '**2*t;'; put 'csb3=(t>' k[3] ')*(t-' k[3] ')**3-t**3+3*' k[3] '*t**2-3*' k[3] '**2*t;'; end; length variable2 $30 plus $10; set pe end=last; if variable='Intercept' then variable='eta'||'=1'; plus='+'; if last then plus=';'; variable2=variable; put variable2 '*' estimate best16. plus; if last then do; put 'shf1=exp(eta)/(1+exp(eta));'; end; run;
data plt;/*create data for plotting*/ do t=0 to 16; AGE_18_24 = 0 ; CALL = 0 ; LIST_BILL = 0 ; . . . %include '\\Msp0wsasp001\prod5\AA\HA Lapse Drivers Luke 2012 Q4\model2.txt';
end; run; goptions reset=global; proc gplot data=plt;/*plots data in SAS*/ symbol1 v=dot h=.5 i=join; axis1 order=(0 to 180) minor=none; plot(shf1)*t=call_TOTAL / vzero haxis=axis1; run; quit;