I see from tutorials where you can declare distribution for parameter array using simple mean and variance. For example
parameters {
real a[M];
}
model {
a ~ normal(0,sigma);
}
But that’s not working for me.
parameters {
real xi[S, S];
vector[K] beta[S,S];
real alpha[S, S];
vector[K] gamma[S,S];
real eta[S];
real<lower=0,upper=100> sigma_xi[S, S]; // sigma for Xi
}
model {
beta ~ normal(0,100);
alpha ~ normal(0,100);
gamma ~ normal(0,100);
eta ~ normal(0, 100);
xi ~ normal(0.0, sigma_xi);
}
All of them got rejected. It dumps a bunch of messages declaring available argument signatures like
real ~ normal(real[], real[])
First, I don’t know how to declare a mean of 0 in an array. Is it like [0,0,…]?
Second, how to do the same when I have 2D array as in case of xi[S, S]?
[Edit: added triple back ticks around code]