Let’s say you have a model like
data {
int<lower=1, upper=K> min_idx;
}
parameters {
simplex[K] alpha
......
}
model {
alpha ~ Dirichlet(...);
if (sort_indices_asc(alpha)[1] != min_idx) {
target += -1e50
}
}
Is it bad practice to have a IF condition like so because it makes the target discontinuous and might hamper inference using HMC? How does HMC in Stan handle conditionals like this?