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

Incorporating interaction terms

To incorporate these interactions in a future model we specify them directly in the right side of the model formula. For example, this specification includes service calls, as well as the interaction between service calls and the number of purchases last month, as model terms:

CoxModel.2 <- coxph(Surv(time0,Xtenure2, Churn2) ~                      Xeducation + Xgender + Xsatisfaction2 + Xservice.calls + Xpurch.last.month:Xservice.calls +                      Xpurch.last.month + Xmonthly.charges,                    data=SURV2)

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