Simulates covariates for each claim. The relative occurrence of each combination of covariates is given the frequency relativities of the covariates.
simulate_covariates(
covariates,
frequency_vector = 1,
claim_size_list = list(1),
random_seed = NULL
)Returns a covariates_data object.
a covariates object, which stores the frequency and severity relativities for given covariate levels.
a vector in the same output as claim_frequency.
optional if frequency_vector is not inputted. A list in the same output as claim_size.
optional seed for random number generation, for
reproducibility. If supplied, the covariate simulation is seeded locally and
the caller's random number stream is restored on exit, so the draws made here
neither depend on nor disturb the surrounding simulation. If NULL (the
default) the stream is left untouched, and a seed set by the caller via
set.seed carries through to the covariate draws.