Learn R Programming

refund (version 0.1-40)

create_shortlabels: Create short labels for pffr terms at model fit time

Description

Creates a named vector mapping mgcv smooth labels to human-readable pffr labels. This is called during `pffr()` fitting and stored in `object$pffr$shortlabels`.

Usage

create_shortlabels(
  label_map,
  m_smooth,
  yind_name,
  where_specials,
  family = NULL
)

Value

Named character vector: names are mgcv smooth labels, values are short labels.

Arguments

label_map

Named list mapping original term names to mgcv smooth labels.

m_smooth

List of smooth objects from the fitted model.

yind_name

Name of the y-index variable.

where_specials

List indicating which terms are which type (par, ff, ffpc, etc.).

family

The model family object (used to detect location-scale families).