interaction#
- superglm.interaction( ) BoundInteraction#
Use an existing interaction specification inside a predictor.
Declare the specification’s parent terms in the same predictor. Their order within the specification is preserved, even when the predictor’s declarations appear in a different order. A
FactorSmoothneeds no parent terms: it reads its variable and group columns itself, as it does underinteractions=, sointeraction(FactorSmooth("age", group="region"))can stand alone in a predictor.- Parameters:
- specInteractionSpec
A supported interaction, such as
SplineCategoricalorFactorSmooth.- namestr, optional
Name used in model results. By default, use the factor smooth’s own name or join a two-parent interaction’s column names with
":".
- Returns:
- BoundInteraction
An interaction declaration accepted by family predictor helpers.
See also
tiShorthand for a two-spline interaction-only tensor.