Skip to content

Register a custom diagnostic

Source: man/registerDiagnostic.Rd ยท Help: ?registerDiagnostic

Adds a function to the diagnostics registry so it can be called by runHeteroTests.

Usage

registerDiagnostic(name, fun)

Arguments

name
Name of the diagnostic.
fun
Function taking model and data arguments.

Value

Invisibly returns NULL.

Details

A diagnostic registered this way is never cached by cachedTest or runHeteroTests, nor is a test of the package registered again under its name: whether it draws random numbers, or reads anything besides the model and the data, cannot be known.

See also

listDiagnostics for the names already registered.

Examples

custom <- function(model, data) list(statistic = 0)
registerDiagnostic("custom", custom)