I am a new stan user and trying to find the posterior of Jeffreys’ prior.
This is my model.
data {
int<lower=0> n; // obs in group x
real x[n];
}
parameters {
real muX;
real<lower=0> sigmaX;
}
model {
x ~ normal(muX, sigmaX);
increment_log_prob(-log(sigmaX));
}
generated quantities {
real postPred;
postPred <- normal_rng(muX, sigmaX);
}
I followed “https://stats.stackexchange.com/questions/156721/define-own-noninformative-prior-in-stan”.
My data also include 0.
How can I add the other parameters in this model?