If that’s the way it is, then that’s the way it is, but is there some reason for that? I am not sure why something like
is possible, but simplex[K] in place of vector[K] is not. Perhaps it is something to do with how the simplex constraint must be checked and that can only be done in a parameter block?
I am doing something related, but not identical so doing something as in the documentation example, where the probability vector is re-created in a loop over observations is the more direct way to implement it, or at least it seems like it is the most direct way to do so right now. But thank you.
Yeah, that’s the gist. Formally, the constraints get checked in all blocks except parameters and model. In parameters the constraints are enforced by constructing the variables using constraining transforms applied to unconstrained variables. And in model, variables defined locally don’t get saved and don’t get checked. See: