Raftery-Lewis Run-Length Diagnostic
The Raftery-Lewis diagnostic estimates how long an MCMC run must be to estimate a chosen posterior quantile to a stated accuracy. It turns the chain into a 0/1 sequence (below or above the quantile), models that sequence as a two-state Markov chain and derives the burn-in, the total number of iterations and the thinning interval.
원하는 사후 분위수를 정해진 정확도로 추정하려면 MCMC를 얼마나 길게 돌려야 하는지 추정하는 진단입니다. 사슬을 분위수 아래인지 위인지에 따라 0과 1로 바꾸고 이를 두 상태 마르코프 연쇄로 보아 번인, 전체 반복 수, 솎아내기 간격을 구합니다.
Is my MCMC chain long enough to estimate a tail quantile of each parameter to the accuracy I need, and how much burn-in and thinning does it need?
내 MCMC 사슬이 각 모수의 꼬리 분위수를 필요한 정확도로 추정하기에 충분히 긴지, 번인과 솎아내기는 얼마나 필요한지 알 수 있을까요?
For each parameter the chain is cut at its empirical q-quantile. The smallest thinning interval at which a first-order Markov model fits the 0/1 sequence (by BIC) is chosen, and the two transition probabilities give the burn-in and the run length needed for an estimate of the probability q within plus or minus r with probability s. Dividing the total by the length needed for independent draws gives the dependence factor I; values above about 5 point to strong autocorrelation or poor mixing.
When to use Raftery-Lewis Run-Length Diagnostic
- You ran a pilot MCMC chain and want to plan the length of the final run.
- You report tail quantiles or credible interval limits and need them estimated precisely.
- You want a per-parameter measure of how strongly autocorrelation inflates the required run length.
When to use something else
- You want to check agreement between several chains: use MCMC Convergence Diagnostics
- You want a summary of posterior draws (HDI, ROPE): use Posterior Draw Summary (HDI, ROPE, MAP, Probability of Direction)
Assumptions and requirements
- Rows are successive draws of one chain in iteration order (a group column can separate chains)
- The chain is at least N_min draws long
- The dichotomised chain is approximately a Markov chain after thinning
- It addresses one quantile at a time and does not prove convergence
What the analysis reports
- Thinning interval, burn-in and total iterations per parameter
- N_min for independent draws
- Dependence factor I
- Transition probabilities of the dichotomised chain
How to report it
The Raftery-Lewis diagnostic (q = 0.025, r = 0.005, s = 0.95) required at most [value] iterations with a burn-in of [value] and thinning of [value]; the largest dependence factor was I = [value].
Related methods
- MCMC Convergence Diagnostics
- Posterior Draw Summary (HDI, ROPE, MAP, Probability of Direction)
- Pseudo-Marginal MCMC (Random-Intercept Logistic Regression)
- Reversible-Jump MCMC (Regression Variable Selection)
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with reference values computed independently in the test suite.
독립 계산. 시험에서 따로 계산한 참조값 대조 참조 시험 1건 통과.
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 Raftery-Lewis Run-Length Diagnostic on Quorant
- Data you need
- a table (CSV or Excel) with item columns (e.g. questionnaire items)
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 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.