Bayesian Hierarchical Model
A Bayesian hierarchical model estimates group-specific random intercepts with partial pooling, learning the between-group standard deviation τ and shrinking small groups toward the overall mean.
베이즈 위계모형은 집단별 무작위 절편을 부분 풀링으로 추정해 집단 간 표준편차 τ 를 구하고 작은 집단을 전체 평균 쪽으로 당기는 방법입니다.
How do I estimate group effects when some groups have very few observations, without pooling everything or treating groups separately?
관측이 몇 개 안 되는 집단도 있는데, 다 합치지도 따로 보지도 않고 집단별 효과를 추정하려면 어떻게 하나요?
A Bayesian hierarchical model gives each group its own intercept drawn from a common normal distribution with standard deviation τ, so groups with little data are pulled toward the overall mean while large groups keep their own estimates. The model is sampled with non-centred Hamiltonian Monte Carlo and reports τ, the intraclass correlation for normal outcomes, shrunken group means and convergence diagnostics including divergences.
When to use Bayesian Hierarchical Model
- Data are nested in schools, clinics, regions or other groups with unequal sizes.
- You want shrinkage estimates for many small groups.
- There are few groups, so a frequentist variance estimate may collapse to zero.
When to use something else
- Slopes are expected to vary by group; use a frequentist mixed model with random slopes (HLM), since this implementation fits random intercepts only.
- Groups are the only units of interest and few in number; use fixed group effects in a regression instead.
Assumptions and requirements
- Group intercepts are exchangeable and normally distributed.
- Observations are independent within groups given the group effect.
- The outcome family (Gaussian, logistic or Poisson) fits the data.
- Sampler diagnostics show convergence and no divergences.
What the analysis reports
- Posterior mean and credible interval of τ (and σ and ICC for Gaussian outcomes)
- Fixed-effect coefficients on the original scale
- Group effects with credible intervals and shrunken group means
- R-hat, effective sample size and divergence count
How to report it
A Bayesian hierarchical [family] model with random intercepts for [number] levels of [group] (4 chains × 2000 draws, max R-hat = [value], [value] divergences) estimated the between-group SD as τ = [value], 95% CrI [[value], [value]] (N = [value]).
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs Bayesian Hierarchical Model itself, at the same price.
- Bayesian Hierarchical Poisson Model — family set to “poisson”
- Bayesian Hierarchical Model for Continuous Outcomes — family set to “gaussian”
- Bayesian Hierarchical Model with Half-Cauchy Prior — prior tau set to “half_cauchy”
- Bayesian negative binomial GLMM — dist set to “negbin”
- Bayesian geometric GLMM — dist set to “geometric”
- Bayesian gamma GLMM — dist set to “gamma”
- Bayesian inverse Gaussian GLMM — dist set to “inverse_gaussian”
- Bayesian exponential GLMM — dist set to “exponential”
- Bayesian probit random-intercept model — link set to “probit”
- Bayesian complementary log-log random-intercept model — link set to “cloglog”
- Bayesian crossed random-effects model —
- Bayesian nested random-effects model — nested set to “on”
- Posterior predictive p-values — predictive set to “on”; ppc stats set to “mean, sd, min, max”
Related methods
- Hierarchical Linear Modeling (HLM)
- Bayesian Generalized Linear Model
- Empirical Bayes Beta-Binomial Shrinkage
How this method is validated
이 방법의 검증 근거
- Automated tests. Checked by automated run tests; no external reference comparison is recorded yet.
자동 시험. 자동 실행 시험을 거칩니다. 외부 참조값과 대조한 기록은 아직 없습니다.
Run Bayesian Hierarchical Model on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable, a grouping variable and predictor (feature) columns
- Price
- 900 credits for one analysis up to 10,000 rows (complexity level 5); larger or wider data costs more. Optional methodologist review: 3600 credits.
- Checking
- Automated run tests; no external reference comparison yet
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.