Parameter constraints

if I have a multidimensional array, is there a way to constrain the upper and lower limits of only one of the vectors? And can I make those constraints relative to another dimension in the same array?

Hi! Welcome to the Stan forum!

Maybe for an array of vectors something like

parameters{
  vector<lower = 0, upper = 1>[N] x1[1];
  vector[N] x2[K]
}
transformed parameters{
  vector[N] x[K+1] = append_array(x1, x2);
}

will do?

2 Likes