draw-methods: Claims: Plot function

Description Usage Arguments Details Value Examples

Description

draw produces a graphical representation of an object Claims (Claims-class).

Usage

1
2
3
4
5
draw(x, value = "all", moment = "gain", output = "boxplot")

## S4 method for signature 'Claims'
draw(x, value = "all", moment = "gain",
  output = "boxplot")

Arguments

x

The Claims object to represent.

value

Character. The value to consider plot, among:

  • claims

  • premiums

  • reinstatements

  • commissions

  • all: default value. Compute the profit.

moment

Character. Moment for analysis:

  • before: before reinsurance;

  • after: after reinsurance;

  • gain: default value. Difference in values by application of reinsurance.

output

Character. Type of graph to produce:

  • boxplot: default value. Boxplot by year

  • histogram: histogram over all years

Details

For boxplots, a red dot represent the mean value for each year.

Value

a plot

Examples

1
2
3
4
5
6
7
8
c <- data.frame(year = unlist(sapply(2000:2017, function(x) rep(x, rpois(1,3)))))
c$amount <- pmax(rnorm(nrow(c), 200000, 100000), 0)
p <- aggregate(amount ~ year, c, sum)
claims <- claims(c, p)
treaty_1 <- xl(ded = 100000, lim = 20000, aad = 5000,
               aal = 200000, prm = 0.01, rns = 1)
claims <- apply_treaty(claims, treaty_1)
draw(claims)

ArnaudBu/reinsureR documentation built on May 22, 2019, 1:44 p.m.