Skip to contents

A model that reproduces every reference: expected layer losses (which may overlap or leave gaps) and excess frequencies. Free values between references are chosen at the analytic center of what is consistent, so gaps get moderate alphas.

Usage

fit_references(
  layers = NULL,
  frequencies = NULL,
  default_alpha = 2,
  rule = c("minimize", "midpoint"),
  alpha_bounds = NULL
)

Arguments

layers

A data frame with columns limit, attachment and expected_loss, or NULL.

frequencies

A data frame with columns threshold and frequency, or NULL.

default_alpha

Alpha above the highest point, unless an unlimited layer sets it.

rule

As in match_tower().

alpha_bounds

NULL, or c(lo, hi): keep the Pareto alpha between consecutive reference points within these bounds. The two pieces fitted inside a limited layer can still fall either side; check with tower_diagnostics().

Value

A tower_model.

Examples

m <- fit_references(
  layers = data.frame(limit = c(1000, 3000), attachment = c(1000, 1500),
                      expected_loss = c(150, 160)),
  frequencies = data.frame(threshold = 1000, frequency = 0.3)
)
layer(m, 3000, 1500)
#> [1] 160