Skip to contents

Start here

The battery runs everything and groups the results by the departure each test detects. The package page has a table for choosing a single test.

run.all.gof()
Run a Battery of Goodness-of-Fit Tests at Once
ebrahim.gof-package ebrahim.gof
ebrahim.gof: Goodness-of-Fit and Calibration Tests for Logistic Regression

Sparse data

Where the classical Hosmer-Lemeshow test loses power. The omnibus test asks whether anything is wrong; the directed tests spend their few degrees of freedom on the shapes where structured misfit concentrates.

ef.gof()
Ebrahim-Farrington Goodness-of-Fit Test for Logistic Regression
edge.gof()
EDGE: Directed Goodness-of-Fit Test for Binary Logistic Regression
edges.gof()
EDGES: Cauchy-Combination Ensemble of Directed GOF Tests (Alias)
cdef.gof()
Covariate-Space Directed Ebrahim-Farrington (CDEF) Goodness-of-Fit Test
def.gof()
Directed Ebrahim-Farrington (DEF) Goodness-of-Fit Test
def.ensemble.gof()
Combine Directed GOF Tests into One Decision (Ensemble)

Penalized (ridge) fits

Under a penalty the usual chi-squared references are not merely weak but invalid, because shrinkage displaces the grouped residuals. These two apply the same correction and differ only in the reference they refer it to.

calm.gof()
Closed-form goodness-of-fit test for penalized logistic regression (CALM)
shrink.gof()
Shrinkage-corrected goodness-of-fit test for penalized (ridge) logistic regression

Pretrained and frozen-weight tests

Weights fixed offline and shipped frozen, so two analysts obtain the same p-value. Nothing is retrained at call time.

legoft()
LEGofT: frozen-weight combination goodness-of-fit test for binary logistic regression
legoft.localize()
Localize misspecification with familywise error control
deepgof1()
DeepGOF-1: a pretrained goodness-of-fit test for logistic regression

Building your own scorer

gof.features()
Goodness-of-fit evidence features for a fitted model
deploy.gof()
Deployable learned-ensemble GOF test via parametric bootstrap

Data and setup

gof_demo
Synthetic binary outcome data with a smooth calibration misfit
gof_demo_grouped
Grouped-covariate companion to gof_demo (replicated covariate patterns)
gof_install_suggests()
Install the optional packages used by run.all.gof()

Printing and plotting

print(<gof_battery>)
Print a goodness-of-fit battery
plot(<gof_battery>)
Plot the GiViTI calibration belt from a goodness-of-fit battery