Skip to contents

MODEL_FN() is a developer-interface constructor for user-facing model functions like LINEAR_REG(). It returns a function that routes to the correct implementation based on the variable mapper <var_id> and method variant.

Usage

MODEL_FN(cls, defs, .name)

Arguments

cls

A string naming the model class, e.g. "linear_reg".

defs

A list of stat_define() objects.

.name

A string used as the model title in output.

Value

A function with signature function(.var_id, .data, ...).