I have a question related to the following case study Hierarchical Partial Pooling for Repeated Binary Trials. I am trying to understand how different parameterizations for the chance of success (\theta_i) or the log-odds of success (\alpha_i) affect the posterior distribution for the mean probability of success.
I used the Stan code linked in this repository, https://github.com/stan-dev/example-models/tree/master/knitr/pool-binary-trials, to fit 3 models to the rat tumor data referenced in the linked note at the top of my post. The three models were (1) a hierarchical model with a direct parameterization for the mean probability of success (hier.stan
), (2) a hierarchical model with a log-odds probability of success and centered parameterization (hier-logit-centered.stan
), and (3) a hierarchical model with a log-odds probability of success and non-centered parameterization (hier-logit.stan
).
All the models have the same data block.
data {
int<lower=0> N; // items
int<lower=0> K[N]; // initial trials
int<lower=0> y[N]; // initial successes
}
This is the parameters and model block for the model with mean (phi) and concentration (kappa) (hier.stan
).
parameters {
real<lower=0, upper=1> phi; // population chance of success
real<lower=1> kappa; // population concentration
vector<lower=0, upper=1>[N] theta; // chance of success
}
model {
kappa ~ pareto(1, 1.5); // hyperprior
theta ~ beta(phi * kappa, (1 - phi) * kappa); // prior
y ~ binomial(K, theta); // likelihood
}
This is the parameters and model block for the centered model with log-odds mean probability (mu) and log-odds population sd (sigma) (hier-logit.stan
). The hyperparameters are similar in the non-centered model.
parameters {
real mu; // population mean of success log-odds
real<lower=0> sigma; // population sd of success log-odds
vector[N] alpha; // success log-odds
}
model {
mu ~ normal(-1, 1); // hyperprior
sigma ~ normal(0, 1); // hyperprior
alpha ~ normal(mu, sigma); // prior (hierarchical)
y ~ binomial_logit(K, alpha); // likelihood
}
My question is about the population-level mean probability of success. I think this would be \phi in the hierarchical model parameterized by mean and concentration, and \mathrm{logit}^{-1}(\mu) in the centered and non-centered hierarchical models with the logit-link.
The figure below plots the posteriors, medians and 95% credible intervals for these parameters for the 3 models. Does anyone have suggestions for that might help me understand why I get different distributions and different medians and 95% credible intervals? Please let me know if I need to update this question with more information for it to be answered!