Problem with convergence when using different scale parameters for groups

Hi all. My model is below. Here, g\in\{1, 2, 3, 4\} denotes the group index, and n\in\{1, 2, \ldots 6\} denotes the participant index. Also, i\in\{1, 2, \ldots 10\} denotes the measurements index. Note that, each participant belongs to every group, and we have a total of 10 measurements for each (participant, group) pair – so, a total of 10 \times 6 \times 4 observations.

a_{ng} \sim \mathcal{N}(\mu_g, \alpha) \hspace{20pt} \forall \; n, g
\mu_g \sim \mathcal{N}(0., \beta_g) \hspace{20pt} \forall \; g
\beta_g \sim \mathcal{HC}(\gamma) \hspace{20pt} \forall \; g
\gamma \sim \mathcal{HN}(50.)

\mathcal{HC}(\cdot) and \mathcal{HN}(\cdot) are the HalfCauchy and HalfNormal distributions respectively with location at 0., in their scale parametrization. \mathcal{N}(\cdot, \cdot) is normal distribution, in location-scale parametrization.

and, the observations (measurements) are modelled as
y_{ng}^{i} \sim \mathcal{N}(a_{ng}, \sigma) where \sigma \sim \mathcal{HN}(50.)

The following shows the posterior of \mu_1, \mu_2 \ldots \mu_4 on the first row, and the 4 chains (each chain has 1000 post-warmup samples) for these posterior distributions in the second row

I ran many simulations with this model, and this occurs often – one of the chains (red chain in above plot), becomes very thin. Is this the famous Neal’s funnel issue?

I suspect it happens because of this structure
\mu_g \sim \mathcal{N}(0., \beta_g) \hspace{20pt} \forall \; g
\beta_g \sim \mathcal{HC}(\gamma) \hspace{20pt} \forall \; g
where the idea is the control how much to pool each \mu_g towards 0.

Instead, if I replace this structure with
\mu_g \sim \mathcal{N}(0., \beta) \hspace{20pt} \forall \; g
\beta \sim \mathcal{HN}(50.)
and remove \gamma from the model – then, the thinning problem doesn’t happen.

So, I’m not sure if this is a funnel issue, or model is mis-specified?

I tried reparameterizing the problematic structure like
\mu_g \gets \mu_g^* \times \beta_g
\mu_g^* \sim \mathcal{N}(0., 1.)
but, this didn’t help either.

Any help / intuition what might be going wrong would be very helpful. Sorry, for not including stan code for this, I’m actually using a library in python to run these.

Most probably given that you have a centered parameterization of the hierarchical model. I didn’t understand your reparameterization notation, but if you give it a non-centered parameterization (I’d suggest asking the maintainers of whatever software you’re using about how to do that).

@SGB: We’re getting more and more of these general questions that are about comp stats in other packages. I don’t want to be rude, but I also don’t want our forums to turn into a general comp stats help desk. Please advise.

I didn’t know I’m still on SGB list.

I made a proposal on community guideline but didn’t push through Forum question posting guideline.

Thanks, @yizhang. I’m not managing the forums—I think @mitzimorris can probably figure out how to take you off the posts.

I like the proposal for guidelines for posting, but the issue we’ll run into is that people won’t read them -or- won’t understand them -or- will get offended by us being too demanding, etc. I just want to know what I should do when someone asks a non-Stan question—do I just ignore it? I really don’t want to encourage the use of our forums as a general stats help desk—we can’t even keep up with the Stan questions!

I agree, Bob. If there’s a forum guidance and people ignore them, I’d ignore their non-complying questions.

But obviously that’s no longer my decision to make.

hi Yi,

removed you from the SGB group.

1 Like