Hi all,
I am wondering how I can define a parameter to be non-zero?
Thanks
Hi all,
I am wondering how I can define a parameter to be non-zero?
Thanks
What range of values near zero do you wish to exclude? If you just wish to exclude literal zeros, you don’t need to do anything at all–the theoretical chances of sampling a literal zero from a continuous distribution are zero, and numerical precision in the neighborhood of zero is good enough that your practical chances of sampling a literal zero are effectively zero.
Thank you, @jsocolar.
How can I exclude a range?
The initial problem is that my model does not work because of ‘rejecting initial values’.
Rejecting initial value: Log probability evaluates to log(0), i.e. negative infinity.
I want to exclude a range to avoid this error.
Usually, the way to avoid this error is to specify principled user-defined initial values. (Well, it might be more common that the issue arises from a bug in the model definition, but I’ll assume that’s not the case here). However, the fact that you’re thinking about solving the problem by excluding a range near zero raises some additional issues. It suggests that you don’t think that this is merely an initialization problem, but that you actually expect a priori that there will be no posterior density in the neightborhood of zero, despite that there might a priori be density on either or both sides of zero. That means that chains initialized on one side of zero or the other are at high risk of getting stuck on one side.
In light of all of this: