I am working on a data that provides the number of failures within a period of time for multiple machiones, so I am considering Poisson regression. The problem with the data is that we don’t believe there can be over 5 failures within the period. For example, there are over 70 failures for some machines, and that can’t be true. The censoring here means whenever there are over 5 failures, we believe that is greater or equal to 5 failures, not the obvious wrong number.

I read through the censoring chapter in the Stan Manual. There are descriptions on upper and lower censoring for normal distribution with `normal_lccdf()`

and `normal_lcdf`

function, but not for Poisson distribution.

I guess we can customize a censored log of complementary cdf for a Poisson regression just like the normal distribution. But since I am quite a newbie in Stan, I wonder if there is anybody who wrote this censored Poisson regression code before and share with me.