I’m trying to model the following problem. I have a list of number of units sold per day during a period of time. I have a model for the demand of the product (a seasonal Poisson regression, which is not important here). I want to link the model with the observations, knowing that there are sales only when there is enough stock:
demand_t ~ Poisson(…)
sales_t = min(demand_t, stock_t)
observations = sales_t
The problem with this is that sales_t is Deterministic, which cannot be given the obs= parameter. Is there a workaround?
Sounds like this could be done with a truncated Poisson distribution. I have not seen people done that but maybe you can search along that line.
You mean sales_t would be modeled by a Poisson distribution truncated at the variable stock_t ?
Could this be done if stock_t is also a random variable?
Anyway, thanks for giving me something to start!
Exactly. And yes stock_t could be a random variable. But I think if the stock_t is a random variable maybe it is easier to write the likelihood as a mixture?
In any case, have a go at the truncated Poisson first, I think it should give some useful insight already.