Bayesian Generalized Linear Model
A Bayesian generalized linear model estimates regression coefficients for normal, binary or count outcomes as posterior distributions under weakly informative priors, summarised with credible intervals and posterior probabilities.
베이즈 일반화선형모형은 정규·이항·빈도 결과의 회귀계수를 약한 정보 사전분포 아래 사후분포로 추정하고 신용구간과 사후확률로 요약하는 방법입니다.
Also known as: Bayesian GLM with Leave-One-Out Diagnostics
다른 이름: LOO 진단 베이즈 일반화선형모형
How do I fit a Bayesian logistic or Poisson regression and report credible intervals instead of p-values?
로지스틱이나 포아송 회귀를 베이즈 방식으로 돌려서 p값 대신 신용구간으로 보고하려면 어떻게 하나요?
A Bayesian GLM combines the likelihood of a Gaussian, logistic, Poisson, negative binomial or ordinal (cumulative logit) regression with weakly informative priors on standardized coefficients and samples the posterior with Hamiltonian Monte Carlo. Report each coefficient's posterior mean, 95% credible interval and convergence diagnostics (R-hat, effective sample size, divergences), and check fit with posterior predictive checks and PSIS-LOO.
When to use Bayesian Generalized Linear Model
- You want direct probability statements about effects, such as P(b > 0).
- Small samples or separation make maximum likelihood estimates unstable and mild regularisation helps.
- You need a predictive comparison of models through leave-one-out cross-validation.
When to use something else
- You need random effects for clustered data; use a Bayesian hierarchical model instead.
- The outcome is ordinal or multinomial; use an ordinal or multinomial regression instead.
Assumptions and requirements
- The chosen family and log/logit/identity link describe the outcome.
- Observations are independent given the predictors.
- Predictors enter linearly on the link scale.
- Chains have converged (R-hat < 1.01, no divergences).
What the analysis reports
- Posterior mean, SD and 95% credible interval per coefficient on the original scale
- Posterior probability that each coefficient is positive
- R-hat, effective sample size and divergence count
- Posterior predictive p-values for the mean, SD and share of zeros
- PSIS-LOO expected log predictive density with Pareto k
- Optional comparison of several predictor sets by PSIS-LOO (elpd differences with SE, stacking and pseudo-BMA weights)
- Optional prior sensitivity: change in posterior means when the coefficient priors are power-scaled
- Optional ordinal (cumulative logit, proportional odds) family with posterior cutpoints and cumulative odds ratios
- Optional multinomial (softmax, reference category) and Student-t robust regression families with the same sampler and diagnostics, posterior mode and maximum-likelihood columns
How to report it
A Bayesian [family] regression (normal priors with scale 2.5 on standardized predictors; 4 chains × 2000 draws, max R-hat = [value]) estimated the coefficient of [predictor] as [value], 95% CrI [[value], [value]], with posterior probability [value] that it is positive (N = [value]).
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs Bayesian Generalized Linear Model itself, at the same price.
- Bayesian Negative Binomial Regression — family set to “negbin”
- Bayesian Ordinal Regression — family set to “ordinal”
- Bayesian Poisson Regression — family set to “poisson”
- Bayesian Logistic Regression — family set to “logistic”
- Bayesian Model Comparison by LOO and Stacking —
- Bayesian GLM with Prior Sensitivity Check — prior sensitivity set to “on”
- Bayesian gamma regression — family set to “gamma”
- Bayesian inverse Gaussian regression — family set to “inverse_gaussian”
- Bayesian GLM with Jeffreys prior — coef prior set to “jeffreys”
- Bayesian GLM with flat prior — coef prior set to “flat”
- Bayesian cloglog regression — link set to “cloglog”
- Bayesian beta regression — family set to “beta”
- Bayesian fractional response regression — family set to “fractional”
Related methods
- Bayesian Linear Regression
- Bayesian Hierarchical Model
- Logistic Regression
How this method is validated
이 방법의 검증 근거
- Independent computation. 4 reference tests compare the results with statsmodels and direct computations (formulas, enumeration or simulation).
독립 계산. statsmodels·직접 계산(식·열거·모의실험) 대조 참조 시험 4건 통과.
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 Bayesian Generalized Linear Model on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 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.