Prior for a scale parameter with a small number of levels

Suppose that we have a model like the following

stan_lmer(zDiff ~ 1 + (1 | condition) + (1 | subject), data=…)

where ‘condition’ is a within-subject factor with k levels. This may well depend on the specific dataset, but in general how small can k go? Is it OK to build a model when k = 2 or 3 with a typical prior of half_normal or half_student for the scale parameter tau? Would a slightly stronger prior help in this context?

Yes, if you only have very few data points, you need a reasonable prior to keep estimates in line if they are not otherwise controlled by the data. The student-t priors can be too wide.

One way you can start answering these questions yourself is with simulated data. You can generate data and see how well it’s fit under different setups.

1 Like