Models to use Predict time till next purchase

I have the transaction history of users from 12 years. I want to predict the time till next purchase in R. Can we use Regression models to predict this continuous value (in terms of months). If so, what would the target variable be ? I have the frequency and recency of purchase for each customer.

Appreciate any suggestions or references.

The basic strategy would be to assume that the activity is distributed according to some family of distributions, and then estimate the parameters based on the data. This wouldn’t really be regression, since the feature variables and the response variables are basically the same. Also, the really basic analysis would base the estimate for each customer only on that customer’s activity, although a more advanced analysis might adjust what family of distributions is expected, or weight towards an expectation of the parameters based on what the average customer is doing.

If you have other variables, such as the dollar amounts of the transactions, or if you don’t assume independence (perhaps people who buy a lot on the weekend have behavior that’s different from other people, for example), then you can do regression analysis between those factors and the parameters.

It depends on what you want to use and what assumptions you want to make. If you assume that the purchases are stochastically independent then you're looking for the the Poisson Point Process. An accessible introduction can be found here.

More generally, the Exponential Distribution predicts the time between successive events. You can use Exponential Regression if you have insight into what the variables that determine the time intervals are (thanks comment!)

If you don't have any insights to the data to allow you to use exponential regression or the Poisson Point Process, you might be able to build a ML algorithm that simulates the purchasing behavior of your clientele and then you can study the simulation to determine the answer.

• The exponential distribution is the best tip among the answers so far. If you have any information that might drive the inter-purchase intervals (e.g., if customers just bought a large amount, this may last them a while so they won't be buying anew soon; or with a price reduction, they might buy sooner), you can run an exponential regression - see here Commented Oct 14, 2017 at 6:10

This is an example of Survival Analysis, and yes, that can be done with regression. You can start at Wikipedia. Start with figuring out how to create a Kaplan Meier curve, maybe compare it for some subgroups, if you've never heard of this area.

This is point process modeling. One simple way to use regression is to regress the next interval of purchase as a function of history and other covariates. In general, you can fit a parametric form of conditional intensity function. A popular choice in neuroscience is to use a linear-nonlinear functional form.