Osius-Rojek Goodness-of-Fit Test for Logistic Regression
The Osius-Rojek test checks the overall fit of a logistic regression by standardising the Pearson chi-square, computed over covariate patterns, with its large-sample mean and variance so that it can be referred to the standard normal distribution.
오시우스-로제크 검정은 공변량 패턴별로 계산한 피어슨 카이제곱을 대표본 평균과 분산으로 표준화하여 표준정규분포와 비교함으로써 로지스틱 회귀모형의 전반적 적합도를 점검합니다.
Does my logistic regression model fit the data, even though most covariate patterns occur only once?
대부분의 공변량 패턴이 한 번씩만 나타나는데도 내 로지스틱 회귀모형이 자료에 잘 맞을까요?
The model is fitted, the data are collapsed to covariate patterns and the Pearson chi-square is computed. Because the usual chi-square reference fails when patterns are sparse, the statistic is centred at J - p - 1 and scaled by the square root of A + RSS, where A depends on the pattern sizes and RSS comes from a weighted regression that accounts for estimating the coefficients. A large absolute z signals lack of fit.
When to use Osius-Rojek Goodness-of-Fit Test for Logistic Regression
- You fitted a binary logistic regression with continuous predictors, so nearly every row is its own covariate pattern.
- You want a global goodness-of-fit test that does not depend on how the data are grouped into deciles.
- You want to report a second fit test next to the Hosmer-Lemeshow test.
When to use something else
- You want to find which predictor is misspecified; a global test only says that something is wrong: use Binary Logistic Regression and inspect residuals
- You want to check whether the logit link itself is wrong in the tails: use Stukel Goodness-of-Fit Test for Logistic Regression
- Your outcome has more than two ordered categories: use Lipsitz Goodness-of-Fit Test for Ordinal Regression
Assumptions and requirements
- Binary outcome and independent observations
- Large sample with many covariate patterns for the normal approximation
- Model fitted by maximum likelihood without separation
What the analysis reports
- Pearson chi-square over covariate patterns and the number of patterns
- Expected value J - p - 1, the A term and the regression RSS
- Standardised z statistic and two-sided p-value
- Observed versus expected events by pattern
How to report it
The Osius-Rojek test did not indicate lack of fit of the logistic model, Pearson chi2 = [value] over [value] covariate patterns, z = [value], p = [value].
Related methods
- Binary Logistic Regression
- Stukel Goodness-of-Fit Test for Logistic Regression
- le Cessie-van Houwelingen-Copas-Hosmer Goodness-of-Fit Test for Logistic Regression
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with statsmodels and direct computations (formulas, enumeration or simulation).
독립 계산. statsmodels·직접 계산(식·열거·모의실험) 대조 참조 시험 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 Osius-Rojek Goodness-of-Fit Test for Logistic Regression on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- 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.