New in Stan, if I replace “mu ~ normal(100, 20)” with “mu~uniform(80, 120)” I got error message in sampling method? Need help to understand why and how to fix that.
data {
int nY;
vector[nY] Y;
}
parameters {
real mu;
real sigma;
}
model {
mu ~ normal(100, 20);
sigma ~ normal(10, 50);
Y ~ normal(mu, sigma);
}
I use pystan to practice stan. And I copy some error messages below :
RuntimeError Traceback (most recent call last)
in
1 out = sm.sampling(
----> 2 data = data
RuntimeError: Initialization failed.