H2ExMOParam-class: H2-Exchangeable Marshall-Olkin calibration parameter

H2ExMOParam-classR Documentation

H2-Exchangeable Marshall–Olkin calibration parameter

Description

CalibrationParam for the H2-exchangeable Marshall-Olkin (average) default counting process model. Extends H2ExMarkovParam and related to ExMOParam.

Usage

## S4 method for signature 'H2ExMOParam'
simulate_dt(object, ..., n_sim = 10000L)

## S4 method for signature 'H2ExMOParam'
simulate_adcp(object, times, ..., n_sim = 10000L)

Arguments

object

A CalibrationParam-object.

...

Pass-through parameters.

n_sim

Number of samples.

times

A non-negative numeric vector of timepoints.

Functions

  • simulate_dt(H2ExMOParam): simulates the vector of default times and returns a matrix x with dim(x) == c(n_sim, getDimension(object)).

  • simulate_adcp(H2ExMOParam): simulates the average default counting process and returns a matrix x with dim(x) == c(n_sim, length(times)).

Simulation

The default times are sampled using the stochastic representation described in details.

Examples

composition <- c(2L, 4L, 2L)
d <- sum(composition)
model_global <- ExMOParam(rmo::exIntensities(rmo::AlphaStableBernsteinFunction(0.4), d))
model_partition <- purrr::map(composition, ~{
  ExMOParam(rmo::exIntensities(rmo::AlphaStableBernsteinFunction(0.5), .x))
  })
models <- c(list(model_global), model_partition)
parm <- H2ExMOParam(fraction = 0.4, models = models)
simulate_dt(parm, n_sim = 1e1L)

composition <- c(2L, 4L, 2L)
d <- sum(composition)
model_global <- ExMOParam(rmo::exIntensities(rmo::AlphaStableBernsteinFunction(0.4), d))
model_partition <- purrr::map(composition, ~{
  ExMOParam(rmo::exIntensities(rmo::AlphaStableBernsteinFunction(0.5), .x))
  })
models <- c(list(model_global), model_partition)
parm <- H2ExMOParam(fraction = 0.4, models = models)
simulate_adcp(parm, 1, n_sim = 1e1L)
simulate_adcp(parm, seq(25e-2, 5, by = 25e-2), n_sim = 1e1L)


hsloot/cvalr documentation built on Sept. 24, 2022, 9:25 a.m.