covariates: Construction of a 'covariates' Object

View source: R/features_02a_claim_covariates.R

covariatesR Documentation

Construction of a covariates Object

Description

Constructs a covariates object which stores all covariate inputs. All covariates will be assumed discrete. Continuous covariates will have been discretized.

Usage

covariates(factors)

Arguments

factors

named list of vectors, containing the name of the covariates and associated factors in vector form.

Details

Creating a covariates object will provide template relativities for the frequency and severity relativities. It is encouraged to use the setter functions set.covariates_relativity to set these values to ensure that all necessary inputs are provided.

Value

Returns a covariates object.

Examples

factors <- list(
"Legal Representation" = c("Y", "N"),
"Injury Severity" = as.character(1:6),
"Age of Claimant" = c("0-15", "15-30", "30-50", "50-65", "over 65")
)

covariate_obj <- covariates(factors)

SynthETIC documentation built on May 29, 2024, 8:47 a.m.