Skip to contents

stat_define() declares a single implementation of a statistical procedure for a given model type. Multiple stat_define objects are passed to HTEST_FN() or MODEL_FN() via defs. This is the main extension point for adding new tests or models.

Usage

stat_define(model_type = NULL, impl = NULL, compatible_params = list())

test_define(model_type = NULL, impl = NULL, compatible_params = list())

model_infer_define(model_type = NULL, impl = NULL, compatible_params = list())

Arguments

model_type

A variable mapper <var_id> class this implementation handles (e.g. x_by, S7::class_formula).

impl

An agendas() object collecting all implementations. The fn of each baseline() and variant() inside receives .proc as its first argument. See baseline() for the expected signature and model_processor() for the keys available on .proc per model type.

compatible_params

A list of S7 param classes (e.g. list(MU, PI)) this implementation accepts in hypothesis claims. An empty list (the default) disables the check entirely. Useful when a test is param-agnostic or the restriction has not yet been declared. Applies to every variant in impl.

Value

A stat_define S7 object.