What’s the correct syntax for an array of vectors, with range constraints?
// Works: A vector of length K vector[K] alpha; // Works: A vector of length K, with range constraint vector<lower=0>[K] alpha; // Does not work vector<lower=0>[K] alpha[J];
array[J] vector<lower=0>[K] alpha;
At least since cmdstan 2.29, I think.
What do you mean by “does not work”? Both syntaxes work fine as far as I can tell. At least the following Stan program compiles in Stan 2.29,
parameters { array[5] vector<lower=0>[10] x; vector<lower=0>[10] y[5]; }
Was there some kind of runtime error?