Hi Folks -
Sorry if this has been posted before, but after doing some searching, I wasn't able to find it.
I'm implementing a model where a subset of individuals have a latent variable corresponding to an unobserved infection time. That time can only happen on the interval from birth to their current age, a_i. But individuals are of different ages, and I want to ensure that the value of the parameter is only between [0,a_i) for each individual.
From the manual, it's doesn't seem like a vector-valued constraint will work in stan when declaring a vector of parameters.
One thought I had was to declare a vector of raw parameter values Z, constrained between [0,1) and then transform them by multiplying by Z * A elementwise where A = [a_1, a_2, ...a_N].
I know this would involve a jacobian adjustment, since I want to sample the values of Z*A. So, I wanted to see if I was missing something about using vector-valued constraints and check to see what the appropriate jacobian adjustment would be for the approach I described.
Thanks!
-Jon