Hi,
When I try to compile the model below, the parser issue a “variable ‘vector’ does not exist” error. I looked in the forum and that kind of error seems to occur when the local parameter is not declared at the top of the block. However, it’s not the case here, so I don’t understand where’s the problem.
data {
int<lower=0> N;
vector<lower=0>[N] X;
vector<lower=0>[N] Y;
}
parameters {
real<lower=12, upper=20> alpha;
real<lower=0> mu;
real<lower=0> sigma;
}
model {
vector[N] epsilon;
mu ~ normal(0, 30);
sigma ~ normal(0, 30);
for (n in 1:N) epsilon[n] = Y[n] - alpha - (X[n] * 30);
epsilon ~ normal(mu, sigma);
}
Many thanks in advance,
Colin