
Construct a relativities mapping for level splitting
Source:R/utils_refinement.R
split_relativities.RdHelper function to create a standardized data.frame defining relativities
for sublevels within a risk factor level. This function is intended to be
used as input for add_relativities().
Value
A data.frame with columns:
- new_level
Character. Name of the new sublevel.
- relativity
Numeric. Multiplicative factor relative to the base level.
Details
This function provides a convenient and safe way to construct the required
input structure for add_relativities(). Each call defines how a single
level of a risk factor is split into multiple sublevels with corresponding
relativities.