Hierarchical partial pooling for repeated binary trials

@bgoodri @Bob_Carpenter @jonah I have two questions related to your nice and very useful write up/tutorial on hierarchical partial pooling with repeated binary trials available here.

  1. Where can I find more detail about the likelihood function, prior, and hyper prior for the partial pooling example? It is not entirely clear to me what these would look like. The other examples on complete and no pooling have these clearly stated. Also, shouldn’t there be a hyperprior? I thought this to be the case when I read “the hierarchical model places a prior on the [player] abilities with parameters that are themselves estimated.”

  2. The first code block you got
    fit_partialpool <- stan_glmer(cbind(Hits, AB - Hits) ~ (1 | Player), data = bball, family = binomial("logit"), prior_intercept = wi_prior, seed = SEED)

Shouldn’t there also be a prior on alpha_n? thus

fit_partialpool <- stan_glmer(cbind(Hits, AB - Hits) ~ (1 | Player), prior=wi_prior, data = bball, family = binomial("logit"), prior_intercept = wi_prior, seed = SEED)

Thanks so much for your help!

I believe everything should be quite well described in the stan_glmer help page and also the vignette (Estimating Generalized (Non-)Linear Models with Group-Specific Terms with rstanarm • rstanarm) referenced from the there. The likelihood and priors stay the same, the only added thing is the varying intercept which gets a normal distribution and a standard deviation hyperparameter (this is a bit obscured by rstanarm allowing more complex structures for more complex models). This hyperparameter than gets a gamma hyperprior (by default with shape = scale = 1, but can be changed via prior_covariance = decov( ... ))

Does that answer your question?

And best of luck with your modelling!

1 Like

@toschwo Sorry for not replying sooner. I had seen your question but forgot to respond (sometimes it’s easy to lose track of which posts I still need to respond to). I think @martinmodrak described it well, but if you have more questions after checking out the vignette he linked to definitely feel free to follow up.