O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plotting the customer satisfaction and number of service call curves

We will also generate two more curves, corresponding to the satisfaction and number of service calls variables:

par(mfrow=c(1,1))plotsurv(ChurnStudy$Xsatisfaction,c(1:5),c('bars'))title(main = "2 KM Curve Satisfaction")/dev.copy(jpeg,'Ch5 - 2 KM Curve Satisfaction.jpg'); dev.off()plotsurv(as.factor(ChurnStudy$Xservice.calls),c(1:6),c('none'))dev.copy(jpeg,'Ch5 - 4 KM Curve Service Calls.jpg');title(main = "4 KM Curve Service Calls")dev.off()

The plots for the curves are sent to the output window, and are copied to the file specified in the preceding code:

User exercise ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required