The code begins by simulating data for the response variable (xchurn). Remember, this variable can take on only two values, 0 and 1. Since we want these groups to behave differently, we will simulate separate data separately for each of the two groups, the churners (xchurn) and those that remained active at the end of the 12 month period (xnochurn):
#simulate churn data====setwd('C:/PracticalPredictiveAnalytics/Outputs')frame.size <- 1000xchurn <- data.frame(Churn=rep(c(1),frame.size))xnochurn <- data.frame(Churn=rep(c(0),frame.size))