Having problems defining random function for custom distribution with mixture of observed and random variables

@junpenglao I think I understand what you are saying now. In an ideal world, we should treat this as a Poisson process with time-dependent probabilities. Can you please help me figure out how we can implement what you have said in the random function given that time is part of the input data and logalpha and beta are latent parameters? I am struggling with writing the right random function for this particular situation.