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")
)

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().

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