Vector ~ normal(0, vector)

I am feeding in a data vector b for sigma for the prior of a. Will the statement below actually do what I want it to?

vector a ~ normal(0, vector b);

Stan tells me a has no prior, but maybe that’s a bug. I want the i-th element in a to have the i-th sigma in b.

I think you should use reals as the data type, (i.e., real for 1d parameters and real[] for n-dimensional parameters.

Off the top of my head, I’m not sure if that syntax works or not (I imagine that it would). If not, you can define a n-dimensional array of 0s e.g.,

transformed data {
   real zeros[N] = to_array_1d( rep_vector(0, N) );
}

And then in the model block have something like a ~ normal(zeros, b);