June 2017
Beginner to intermediate
576 pages
15h 22m
English
First, extract a sample for the highest and lowest satisfaction scores satisfaction=1 indicates more early churners than satisfaction=5, due to the density of the points:
sat.fit.low <- survfit(CoxModel.1, newdata=subset(ChurnStudy[1:300,],as.integer(Xsatisfaction) == 1))plot(sat.fit.low,col=c('red') ,lty=1,xlab="Months", ylab="Hazard")title(main = "Sat (Lowest) Survival")#sat.fit.high <- survfit(CoxModel.1, newdata=subset(ChurnStudy[1:300,],as.integer(Xsatisfaction) == 5))plot(sat.fit.high,col=c('blue') ,lty=1,xlab="Months", ylab="Hazard")title(main = "sat (Highest) Survival")dev.copy(jpeg,Ch5 - CoxModel1 sat.jpg); dev.off()
Here is the side-by-side comparison of the highest and lowest satisfaction ...