Learn R Programming

SynthETIC (version 1.1.2)

simulate_covariates: Covariates Simulation

Description

Simulates covariates for each claim. The relative occurrence of each combination of covariates is given the frequency relativities of the covariates.

Usage

simulate_covariates(
  covariates,
  frequency_vector = 1,
  claim_size_list = list(1),
  random_seed = NULL
)

Value

Returns a covariates_data object.

Arguments

covariates

a covariates object, which stores the frequency and severity relativities for given covariate levels.

frequency_vector

a vector in the same output as claim_frequency.

claim_size_list

optional if frequency_vector is not inputted. A list in the same output as claim_size.

random_seed

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.