makeBreakAnnualInput {BALD}R Documentation

Create an Object of class BreakAnnualAggLossDevModelInput.

Description

Create an Object of class BreakAnnualAggLossDevModelInput.

Usage

makeBreakAnnualInput(
incremental.payments=decumulate(cumulative.payments),
first.year.in.new.regime=trunc(median(as.integer(dimnames(incremental.payments)[[1]]))),
prior.for.first.year.in.new.regime=c(2,2),
extra.dev.years=1,
extra.exp.years=1,
non.stoch.inflation.rate=0,
non.stoch.inflation.weight=1,
stoch.inflation.rate=0,
stoch.inflation.weight=1-non.stoch.inflation.weight,
stoch.inflation.lower.bound=-1,
stoch.inflation.upper.bound=Inf,
known.stoch.inflation.mean=NA,
known.stoch.inflation.persistence=NA,
total.dev.years=extra.dev.years+dim(incremental.payments)[2],
total.exp.years=extra.exp.years+dim(incremental.payments)[1],
cumulative.payments=cumulate(incremental.payments),
exp.year.type=c('ambiguous', 'py', 'ay'),
prior.for.knot.locations.pre.break=NA,
prior.for.number.of.knots.pre.break=c(3, 1/7),
prior.for.knot.locations.post.break=NA,
prior.for.number.of.knots.post.break=c(3, 1/7),
use.skew.t=FALSE,
bound.for.skewness.parameter=10,
last.column.with.scale.innovation=dim(incremental.payments)[2],
use.ar1.in.calendar.year=FALSE,
use.ar1.in.exposure.growth=TRUE,
projected.rate.of.decay=NA)

Arguments

incremental.payments

A square matrix of incremental payments. Row names should correspond to the exposure year. Only upper-left (including the diagonal) of Triangle may have non-missing values. Lower-right must be NA.

first.year.in.new.regime

May be one of two types. 1) A single numeric value. 2) A numeric vector of length 2. See Details.

prior.for.first.year.in.new.regime

A numeric vector of length 2. See Details.

extra.exp.years

A single integer value (total.exp.years overrides) greater than or equal to 1 (default is 1) specifying the number of additional exposure years (or rows in the triangle) to project.

extra.dev.years

A single integer value (total.dev.years overrides) greater than or equal to 1 (default is 1) specifying the additional number of development years (or columns in the triangle) to project.

non.stoch.inflation.rate

May be one of three types (See Inflation Rate in Details). 1) A single numeric value. 2) A vector of numerics (of specific length). 3) A matrix of numerics (of specific dim).

non.stoch.inflation.weight

May be one of three types (See Inflation Rate in Details). 1) A single numeric value. 2) A vector of numerics (of specific length). 3) A matrix of numerics (of specific dim).

stoch.inflation.rate

May be one of two types (See Inflation Rate in Details). 1) A single numeric value of zero. 2) A vector of numerics (of specific length).

stoch.inflation.weight

May be one of three types (See Inflation Rate in Details). 1) A single numerical value. 2) A vector of numerics (of specific length). 3) A matrix of numerics (of specific dim).

stoch.inflation.lower.bound

May be one of three types (See Inflation Rate in Details). 1) A single numeric value. 2) A vector of numerics (of specific length). 3) A matrix of numerics (of specific dim).

stoch.inflation.upper.bound

May be one of three types (See Inflation Rate in Details). 1) A single numeric value. 2) A vector of numerics (of specific length). 3) A matrix of numerics (of specific dim).

known.stoch.inflation.mean

May be one of two types (See Inflation Rate in Details). 1) A single numeric value. 2) NA.

known.stoch.inflation.persistence

May be one of two types (See Inflation Rate in Details). 1) A single numeric value. 2) NA.

total.exp.years

A single integer value (overrides extra.exp.years) specifying the last exposure year to project. Must be at least the number of rows in incremental.payments + 1.

total.dev.years

A single integer value (overrides extra.dev.years) specifying the last development year to project. Must be at least the number of columns in incremental.payments + 1 .

cumulative.payments

A numeric matrix with the same dim and dimnames as incremental.payments. Must be a possible cumulative payment triangle of incremental.payments. (See Cumulative Payments Section).

exp.year.type

A single character value indicating the type of exposure years: ‘ambiguous’, ‘py’, and ‘ay’ mean ‘Exposure Year’, ‘Policy Year’, and ‘Accident Year’; respectively.

prior.for.knot.locations.pre.break

A single numeric value of at least 1. The prior for the location of knots is a scaled beta with parameters c(1,prior.for.knot.locations.pre.break).

prior.for.number.of.knots.pre.break

A two element vector giving the paramters for the prior number of knots.

prior.for.knot.locations.post.break

See prior.for.knot.locations.pre.break. Large values produce stable consumption paths at high development years.

prior.for.number.of.knots.post.break

A two element vector giving the paramters for the prior number of knots.

use.skew.t

A logical value. If TRUE the model assumes the observed and estimated log incremental payments are realizations from a skewed t distribution; if FALSE it will assume zero skewness. (See Reference.)

bound.for.skewness.parameter

A positive numerical value representing the symetric boundaries for the skewness parameter. In most cases, the default should be sufficient. Ignored if use.skew.t=FALSE.

last.column.with.scale.innovation

A single integer must be at least 1 and at most the number of columns in incremental.payments. See Measurment Error-Second Order Random Walk in Details.

use.ar1.in.calendar.year

A logical value. The calendar year effect errors may (at the users digression) include an autoregressive process of order 1. TRUE turns on the ar1 process, FALSE turns it off.

use.ar1.in.exposure.growth

A logical value. The exposure growth errors may (at the users discretion) include an autoregressive process of order 1. TRUE (the Default) turns on the ar1 process, FALSE turns it off.

projected.rate.of.decay

May be one of three types (See Projected Rate of Decay in Details). 1) NA. 2) A matrix of numerics (of specific dim). 3) A named list.

Details

The loss development models require a lot of input. Much of the input is directly dependent on the values of other input. As such, this function facilitates much of the work of setting model parameters and determining which output to collect. See vignette('BALD').

The function creates an object of class BreakAnnualAggLossDevModelInput.

Many arguments and much functionality is described in makeStandardAnnualInput.

first.year.in.new.regime

The break model allows for a structural break along the exposure year axis in the consumption path. The slope of the pre-break consumption path is used to extend the post-break consumption path. The time when the break occurs can either be specified with 100 To specify the first exposure year in which a new consumption path applies, the user should supply a single value to the parameter first.year.in.new.regime. To have the model estimate the point in time when the break occurs, the user should supply a range (min and max) for the possible values to first.year.in.new.regime. Note also that the number of rows above and below the break must be at least 4 and as such a triangle of size 8 is the smallest triangle which can be estimated with a break.

prior.for.first.year.in.new.regime

The prior for the first.year.in.new.regime is a (scaled and discretized) beta distribtion. A value of c(1,1) would indicate a uniform distribution. See firstYearInNewRegime.

prior.for.knot.locations.pre.break and prior.for.knot.locations.post.break

If these values are NA (the default), then prior.for.knot.locations.pre.break will be assigned a value of 2. And prior.for.knot.locations.post.break wil be assigned a value of 1 + (num.years.in.post.break.period + 0.5 * num.years.in.break.period)/num.years.in.triangle.. These values must either both be NA or both be set to numbers.

Value

An object of class AggModelInput. This the model specified by the returned object must then be estimated using the function runLossDevModel.

References

Kim, Y., and J. McCulloch (2007) “The Skew-Student Distribution with Application to U.S. Stock Market Returns and the Equity Premium,” Department of Economics, Ohio State University, October 2007

Examples

rm(list=ls())
library(BALD)
data(CumulativeAutoBodilyInjuryTriangle)
CumulativeAutoBodilyInjuryTriangle <- as.matrix(CumulativeAutoBodilyInjuryTriangle)
sample.col <- (dim(CumulativeAutoBodilyInjuryTriangle)[2] - 6:0)
print(decumulate(CumulativeAutoBodilyInjuryTriangle)[1:7, sample.col])
data(HPCE)
HPCE <- as.matrix(HPCE)[,1]
HPCE.rate <- HPCE[-1] / HPCE[-length(HPCE)] - 1
print(HPCE.rate[(-10):0 + length(HPCE.rate)])
HPCE.years <- as.integer(names(HPCE.rate))
max.exp.year <- max(as.integer(
dimnames(CumulativeAutoBodilyInjuryTriangle)[[1]]))
years.to.keep <- HPCE.years <=  max.exp.year + 3
HPCE.rate <- HPCE.rate[years.to.keep]
break.model.input <- makeBreakAnnualInput(
cumulative.payments = CumulativeAutoBodilyInjuryTriangle,
stoch.inflation.weight = 1,
non.stoch.inflation.weight = 0,
stoch.inflation.rate = HPCE.rate,
first.year.in.new.regime = c(1986, 1987),
prior.for.first.year.in.new.regime=c(2,1),
exp.year.type = 'ay',
extra.dev.years = 5,
use.skew.t = TRUE,
bound.for.skewness.parameter=5)

[Package BALD version 1.0.0-3 Index]