I would like to estimate what is essentially a transition matrix, where M[i,j] = P(go to state j | start in state i). If there are no restrictions on the transition probabilities, I can use a dirichlet prior on each row of M
for(i in 1:C) {
M[i] ~ dirichlet(rep_vector(1, C));
}
where C is the number of rows and columns in M. However, I would now like to implement this where known elements of M are 0 (i.e. we know that some transitions are impossible), and where these elements are something that can be passed into the data from a user and are not hardcoded. How would you recommend writing this model in Stan?