I am using a user defined log likelihood function in my Rstan code. The full code is:
. To make it faster, I wrote the code in a second format as:
. The second code does not work. The first one works fine.
Can anyone say what is wrong with this second case? I am naive in stan. Any help would be appreciated.