Pseudo-Marginal MCMC (Random-Intercept Logistic Regression)
Pseudo-marginal MCMC is a Metropolis-Hastings sampler in which a likelihood that cannot be computed exactly is replaced by a random but unbiased estimate of it. As long as the estimate of the current state is kept until the next acceptance, the chain still converges to the exact posterior. Here it is applied to a logistic regression with a random intercept for each cluster, whose likelihood is an integral over the cluster effects.
가능도를 정확히 계산할 수 없을 때 그 가능도의 불편 추정값을 대신 넣어 메트로폴리스-헤이스팅스 표본추출을 하는 방법입니다. 현재 상태의 추정값을 다음 채택 때까지 그대로 유지하면 사슬은 정확한 사후분포로 수렴합니다. 여기서는 군집마다 무작위 절편이 있는 로지스틱 회귀에 적용합니다.
How do predictors affect a binary outcome when observations are grouped in clusters, and how much do clusters differ, with full Bayesian uncertainty and no approximation of the likelihood?
관측값이 군집으로 묶인 이분형 결과에서 예측변수의 효과와 군집 간 차이를 가능도 근사 없이 완전한 베이즈 불확실성과 함께 알 수 있을까요?
For each proposed set of parameters the method estimates every cluster's likelihood by importance sampling around that cluster's most likely random effect and multiplies the estimates. The proposal is accepted or rejected with the usual Metropolis-Hastings rule using these estimates. The output gives posterior means and credible intervals for the coefficients, the SD of the cluster intercepts and the latent intraclass correlation, together with the acceptance rate, effective sample sizes and the noise of the log-likelihood estimate.
When to use Pseudo-Marginal MCMC (Random-Intercept Logistic Regression)
- A binary outcome is measured on units nested in clusters (patients in hospitals, pupils in schools) and you want Bayesian inference for a random-intercept model.
- You want a sampler whose target is the exact posterior even though the likelihood can only be estimated.
- You want to see how the precision of a likelihood estimator affects MCMC efficiency.
When to use something else
- You only need maximum-likelihood estimates of a mixed model: use Generalized Linear Mixed Model (GLMM)
- The latent variables form a time series (state-space model): use Particle Markov Chain Monte Carlo (PMMH and Particle Gibbs)
- The outcome is continuous and there is no clustering: use Bayesian Linear Regression
Assumptions and requirements
- Outcome coded 0/1 and conditionally independent within a cluster given its random intercept
- Cluster intercepts are normal with mean 0 and SD sigma_u
- Priors: normal on coefficients (standardised features), half-Cauchy on sigma_u
- Enough importance draws so that the log-likelihood estimator SD is roughly 1 to 1.7
What the analysis reports
- Posterior mean, SD and credible interval for each coefficient (log-odds) and odds ratio means
- Posterior of the random-intercept SD and latent intraclass correlation
- Acceptance rate and effective sample sizes
- SD of the estimated log-likelihood at the posterior mean and the quadrature log-likelihood
How to report it
A random-intercept logistic regression fitted by pseudo-marginal MCMC ([value] draws per cluster, [value] retained iterations, acceptance [value]) gave a coefficient for x of [value] (95% CrI [[value], [value]]) and a random-intercept SD of [value] (95% CrI [[value], [value]]).
Related methods
- Generalized Linear Mixed Model (GLMM)
- Particle Markov Chain Monte Carlo (PMMH and Particle Gibbs)
- Bayesian Hierarchical Model
- Bayesian Generalized Linear Model
- MCMC Convergence Diagnostics
How this method is validated
이 방법의 검증 근거
- Independent computation. 2 reference tests compare the results with reference values computed independently in the test suite.
독립 계산. 시험에서 따로 계산한 참조값 대조 참조 시험 2건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Pseudo-Marginal MCMC (Random-Intercept Logistic Regression) on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and a cluster ID
- 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
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.