I’ve been looking into vectorizing the code for a Stan model and stumbled upon the issue of not being able to vectorizing bernoulli_logit_lpmf()
the current (working) code says
for (i in 1:N) {
log_lik[i] = bernoulli_logit_lpmf( Outcome[i] | mu[i] )
}
I’d like to turn it into
log_lik = bernoulli_logit_lpmf( Outcome | mu)
but this does not seem to work. Is there something obvious I’m missing, or is the function not vectorizable?
Thanks.
Riccardo