Learn R Programming

tailloss (version 1.0)

compressELT: Compress the event loss table

Description

Function to merge losses of the same amount adding up their corresponding occurrence rates, and to round the losses to the 10^digits integer value.

Usage

compressELT(ELT, digits = 0)

Arguments

ELT
Data frame containing two numeric columns. The column Loss contains the expected losses from each single occurrence of event. The column Rate contains the arrival rates of a single occurrence of event.
digits
Integer. It specifies the rounding of the losses to the 10^digits integer value of the event loss table. digits < 0 decreases the precision of the calculation, but considerably decreases the time to perform it. If digits = 0 it only merges the losses of the same amount adding up their corresponding rates. The default value is digits = 0.

Value

Data frame containg two numeric columns. The column Loss contains the expected losses from each single occurrence of event. The column Rate contains the arrival rates of a single occurrence of event.

Examples

Run this code
data(UShurricane)

# Compress the table to thousands of dollars

USh.k <- compressELT(ELT(UShurricane), digits = -3)
summary(USh.k)

# Compress the table to millions of dollars

USh.m <- compressELT(ELT(UShurricane), digits = -6)
summary(USh.m)

Run the code above in your browser using DataLab