summary.gof_battery: Summarise a goodness-of-fit battery by family

View source: R/battery_summary.R

summary.gof_batteryR Documentation

Summarise a goodness-of-fit battery by family

Description

Condenses a run.all.gof or run.all.external result to one line per test family: how many tests ran, how many returned a p-value, how many reject at alpha, and the smallest p-value with the test that gave it. It answers "which kind of departure do the data point to" before the full table is read.

Usage

## S3 method for class 'gof_battery'
summary(object, alpha = 0.05, ...)

## S3 method for class 'summary.gof_battery'
print(x, ...)

Arguments

object

A gof_battery object.

alpha

Level at which a p-value counts as a rejection. Default 0.05.

...

Not used.

x

A summary.gof_battery object.

Details

The counts are descriptive. The tests within a family are strongly correlated and no multiplicity adjustment is made, so a count of rejections is not itself a test; for an error-controlled statement of which part of the model is wrong, use localize.gof or localize.external.

The rows that run.all.gof prints for comparison only (the sparse Pearson and Deviance statistics and the F-test, which do not hold their level on ungrouped binary data) are counted in Tests and With_p but not in Rejected, and never give Smallest_p.

Value

An object of class "summary.gof_battery": a data frame with columns Family, Tests (rows in the battery), With_p (rows with a p-value), Rejected (p-values at most alpha, comparison rows left out), Smallest_p and Smallest_test, in the family order of the printed battery, with the attribute alpha.

See Also

run.all.gof, print.gof_battery.

Examples

fit <- glm(outcome ~ age + bmi + sex + treatment, data = gof_demo, family = binomial)
summary(run.all.gof(fit, include_slow = FALSE, install = "no"))

ebrahim.gof documentation built on Oct. 11, 2026, 5:07 p.m.