# Survival analysis for an event with a possibly infinite lifetime?

I'm trying to see if it is possible to use some sort of survival analysis in the context of analyzing daily demand for very slow moving items (i.e. items where one or two units are sold every few weeks).

In this scenario, it seems more reasonable to try to predict "how many days until I make a sale?" as opposed to predicting "how much will I sell tomorrow?" and that the best approach to do so is a form of survival analysis where I try to figure out how long will an item survive on a shelf before it gets bought, based on an average rate of sale calculated from historical sales data.

The problem is that all of the survival functions/reliability functions I've seen assume that the event that is being predicted will happen sooner or later.

But in retail sometimes that assumption doesn't hold. Instead, for some types of item we assume that if an item doesn't get sold within a certain time limit, it will never get sold (so its lifetime on the shelf is potentially infinite), and the item needs to be moved to clearance.

My questions:

• Is survival analysis the right approach for this at all?
• If survival analysis is indeed a possible approach for this problem, how would we account for the potentially infinite shelf life of an item?
• Survival analysis deals with data that is (most often) right censored, meaning for some measurements you only know that the outcome is at least the value you measured (imagine if you are modelling the time until a patient develops cancer, but dies before a tumor develops, then this patient is right censored). You do not have anything like this. Instead, this seems like a Poisson process with a small intensity, except that does not model the phenomenon of events ceasing to occur after a certain time. – Sanderr May 24 '18 at 13:31
• @Sanderr: I respectfully disagree. We do quite certainly have right censoring, in the form of the date on which the time series of sales cuts off. Which means that survival analysis should work pretty much "out of the box". Whether it actually works better than Poisson/Negbin regression or similar would need to be seen. – Stephan Kolassa May 24 '18 at 13:38
• There's a strong empirical basis to the claim of infinite life time, is there? – Alexis May 24 '18 at 15:16

I think survival analysis can be used here. You use survival analysis when the outcome is right censored, which means it leaves the study without a recorded outcome.

So you could have sale as the event, and withdrawn from sale as censored at the date the item is withdrawn. (Not withdrawn and not sold at the time of analysis is also censored.) This means you allow the possibility the item would have been sold sometime if it had not been withdrawn, but you don't know how long it would have taken to sell.

This is not the same as your question scenario, where you say you assume the item will never sell. If you truly believe the item will never sell, then you don't need to censor it. You can just record it as not sold. If the allowed shelf time is constant and you have data for all items at the end of the allowed shelf time, you can look at what is sold as a binary outcome.

Another more complicated model is to look at competing risks survival, where the competing outcomes are sold or withdrawn from sale, and censored means that neither of these outcomes has occurred at the time of data collection.

If you model the time it takes for a unit to sell as $T_i$, it is true that we could assume this follows some distribution, $F$ (with density $f$), and define a likelihood: $$L(T) = \prod_{isNotCensored(i)} f(T_i) \prod_{isCensored(i)} (1-F(T_i)).$$

I disagree that competing risks is applicable here, since the decision to remove inventory is not random. For those interested, there are lifetime models where there is a positive probability of infinite life -- search for "limited failure population model."

I think this is a wrong approach, however, because the average lifetime will be proportional to the amount of inventory. I agree with the comment that treating sales as a Poisson process is a better model. With that you can predict sales based on the estimated rate, which can be modeled as varying with time, etc.

• I think you're right about competing risks not being appropriate. I threw that in at the end without really thinking it through. I'm not clear where your comment that "average lifetime will be proportional to the amount of inventory" comes from. I can't get that from the question, so I guess you have content knowledge that I don't (I've never dealt with sales data). Can you explain further? – timbp May 25 '18 at 12:40
• I'm coming at this from an armchair perspective :) It seems reasonable to assume that if it takes a week to sell 100 units, it will take two weeks to sell 200 units. – HStamper May 25 '18 at 16:56