I was trying to debug the log(0) error and some of the Stan forums recommended me to print the output to see which part of the model is causing errors. When I tried printing the values I was getting the output as shown below,
The values printed seem fine. MgCa_calib_m output is the vector that is used as the location parameter in normal distribution. None of it is 0 which can make the output log(0).
Now, how do I identify which initial values are being rejected to debug this error?
Part of Output:
Chain 1: Rejecting initial value:
Chain 1: Log probability evaluates to log(0), i.e. negative infinity.
Chain 1: Stan can’t start sampling from this initial value.
Chain 1: a6: -1.877