标题: do not delete [打印本页] 作者: shiyiming 时间: 2012-9-4 02:31 标题: do not delete /* CRM class 3, 2011-2012 */
LIBNAME f 'H:\SAS_CRM\case_class_2';
/************************************************************************************************//******************************** CELL2CELL ****************************************************//************************************************************************************************/
/* PART A *//**********//* 1. What is the impact of historical calling behavior of a customer on attrition behavior?*//*------------------------------------------------------------------------------------------*//* logistic regression with 'months in service: number of months a person has been a customer' as independent */
proc univariate data=f.telecom_crm1;var months;run;
PROC LOGISTIC data=f.telecom_crm1;model churndep (event='1') = months /clparm = wald alpha = 0.01;title 'results logistic regression with months';RUN;*the more months in service, the higher the risk of churn;
data test;min = 1/(1+exp((-0.0897 + 6* 0.00476)*(-1)));max = 1/(1+exp((-0.0897 + 61* 0.00476)*(-1)));run;proc print data=test;run;*the probability of churning for the customer with the lowest value on 'month' equals 48.5%;*the probability of churning for the customer with the highest value on 'month' equals 55%;
/* logistic regression with 'recchrge' as independent *//* meaning of the variable: mean total recurring charge (basic rate for the customer’s calling plan) */
PROC LOGISTIC data=f.telecom_crm1;model churndep (event='1') = recchrge /clparm = wald alpha = 0.01;title 'results logistic regression with recchrge';RUN;*the higher the mean total recurring charge, the lower the risk of churn;*the probability of churning for the customer with the lowest value on 'recchrge' equals 58%;*the probability of churning for the customer with the highest value on 'recchrge' equals 15.4%;
/* logistic regression with 'roam' as independent *//* meaning of the variable: mean number of roaming calls */
PROC LOGISTIC data=f.telecom_crm1;model churndep (event='1') = roam /clparm = wald alpha = 0.01;title 'results logistic regression with roam';RUN;*the higher the mean number of roaming calls, the higher the risk of churn;*the probability of churning for the customer with the lowest value on 'roam' equals 49.7%;*the probability of churning for the customer with the highest value on 'roam' equals 99.7%;
/* logistic regression with 'mean monthly minutes of use' as independent */
PROC LOGISTIC data=f.telecom_crm1;model churndep (event='1') = mou /clparm = wald alpha = 0.01;title 'results logistic regression with mou';RUN;*the more the network is used by a customer, the lower the risk of churn;*the probability of churning for the customer with the lowest value on 'mou' equals 52.7%;*the probability of churning for the customer with the highest value on 'mou' equals 17.1%;
/* logistic regression with 'mean monthly revenue' as independent */
PROC LOGISTIC data=f.telecom_crm1;model churndep (event='1') = revenue /clparm = wald alpha = 0.01;title 'results logistic regression with revenue';RUN;*the higher the mean monthly revenue of a customer, the lower the risk of churn;*the probability of churning for the customer with the lowest value on 'revenue' equals 50.9%;*the probability of churning for the customer with the lowest value on 'revenue' equals 37.9%;