Prior Correction for Oversampled (Case-Control) Logistic Regression
When events are oversampled, as in case-control or choice-based samples, logistic slopes remain valid but the intercept and predicted probabilities reflect the sample event rate. Prior correction shifts the intercept using the known population event rate; the weighting correction refits the model with weights that restore the population proportions and uses sandwich standard errors.
사례대조 표본처럼 사건을 과대표집하면 로지스틱 기울기는 그대로 타당하지만 절편과 예측확률은 표본의 사건 비율을 따릅니다. 사전 보정은 알려진 모집단 사건 비율로 절편을 옮기고, 가중 보정은 모집단 비율을 되살리는 가중치로 다시 적합해 샌드위치 표준오차를 씁니다.
How do I obtain population-level intercepts and predicted probabilities from a logistic model fitted to an oversampled sample?
과대표집한 표본으로 적합한 로지스틱 모형에서 모집단 수준의 절편과 예측확률을 어떻게 얻습니까?
The method reports the sample and corrected intercepts with the offset applied, the unchanged slopes with their standard errors, the weighted estimates with sandwich standard errors, and the mean corrected predicted probability compared with the population rate.
When to use Prior Correction for Oversampled (Case-Control) Logistic Regression
- Cases were oversampled relative to their population frequency.
- You need predicted probabilities on the population scale.
- The population event rate is known from registers or prior studies.
When to use something else
- The sample is a simple random sample: use Binary Logistic Regression
- Separation or very few events make estimates unstable: use Firth Penalized Logistic Regression
Assumptions and requirements
- Sampling depends on the outcome only
- Known population event probability
- Correct logistic model (for prior correction)
What the analysis reports
- Corrected intercept and offset
- Slopes and their SE
- Weighted estimates with sandwich SE
- Corrected predicted probabilities
How to report it
With a sample event rate of [value] and a population rate of [value], prior correction moved the intercept from [value] to [value]; the weighted estimator gave [value].
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with statsmodels and direct computations (formulas, enumeration or simulation) at a stated tolerance of 1e-6.
독립 계산. statsmodels·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과(허용오차 1e-6).
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 Prior Correction for Oversampled (Case-Control) Logistic Regression on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 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.