Since s is uniformly distributed and the sampler works on the basis of relative log density I think you can actually drop this term from the model without repercussions.
@emiruz, Thanks for the additonal info, I have a follow up question. I tried to comment out the initialization, I get the following error:
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.
However even when I set the initial value to zero using “log_p = rep_vector(0,N)”, the run goes through fine. Can you please help me understand this phenomenon? How is the log(0) coming by when I do not set any initial value?
If you don’t set an initial value it’s implicitly set to NaN (“not a number”). The error message is a bit misleading, it just means the sample is rejected but in this case the log probability is actually NaN.