You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
discuss pinning parameters in workflow in User's Guide #942
We should discuss the process of pinning parameters when doing development. This can make the models much faster to fit and also give us some hints at relevant hyper priors. For example, suppose we have a hierarchical model
data {
int<lower=0> N;
}
parameters {
vector[N] alpha;
real<lower=0> sigma;
}
model {
alpha ~normal(0, sigma);
sigma ~???
}
This is going to try to fit alpha and sigma and create a pure funnel posterior which has varying geometry and is not log concave.
We can replace this with a model with a fixed value, say sigma = 1.7. But this requires a new Stan model:
data {
int<lower=0> N;
}
parameters {
vector[N] alpha;
}
model {
alpha ~normal(0, 1.7);
}
If we fit this second model, we will get a posterior distribution over alpha. I have added a generated quantities block that shows how we can recover the actual scale of the parameter variation per draw, and hence get a posterior over it which can help inform our hyper prior on sigma.
Activity