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.
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.
Returns
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
data(UShurricane)# Compress the table to thousands of dollarsUSh.k <- compressELT(ELT(UShurricane), digits =-3)summary(USh.k)# Compress the table to millions of dollarsUSh.m <- compressELT(ELT(UShurricane), digits =-6)summary(USh.m)