I'm trying to build a model in R that predicts when a customer will purchase a product again.

However, I don't know what kind of model can handle time and predict this kind of outcome. I'm wondering to use: buy till you die package, but this package output the frequency of future purchases, and not when this purchases will happening.

  • 1
    $\begingroup$ Opposite of churn is customer retention AFAIK :) $\endgroup$
    – Dawny33
    Commented Jan 27, 2016 at 10:12
  • $\begingroup$ In some contexts I've also seen using "recurrent clients" and "active users" $\endgroup$ Commented Jan 27, 2016 at 12:49

1 Answer 1


Short Answer: You could just build a model to predict purchase (0/1) and call it a day. Create a feature that is count of past purchases to control for repeat customers. BUT if you want to specifically deal with the time component (which is certainly more interesting)...

TTE Models: You should look at Time-to-Event models (accelerated time failure model, etc.) Normally, the event (0/1) is usually something phrased as a negative outcome (like death or loan default), but this is just because of the research fields these models stem from. There is no reason you can't re-pose your outcome to be a purchase event.

Watch Out For: Dealing with Censoring in the data. See Here

Get creative, I can't really comment on great detail here because you didn't give a feel for your exact dataset but you might try and work your dependent variable into something more concrete, for example, time between first view of customer and first purchase, or time between most resent 2 purchases.

Think about the purchase time distribution. Essentially, start to think of ways of parameterizing the purchase-time distribution given some conditionals (customer tenure, total purchases, etc.) As you expand on this vein of thought you'll come across methods that will help. For (a simple) example, using EM to estimate the parameters of various purchase time conditional distributions.

Hope this helps!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.