claim_changes: Detect all changes in a 'loss_df' at different calendar...

Description Usage Arguments Details Examples

Description

claim_changes is designed to make create a dataframe for all values that have changed from one calendar date to another. A "changed claim" is a claim in a loss_df in which one or more of the values has changed from one selected calendar periods to another. A changed claim must have a unique 'id' for it's 'origin'. (i.e. if a claim differs origin year from 'calendar1' to calendar2' it will be returned as two seperate claims)

Usage

1
claim_changes(ldf, calendar1, calendar2, values = NULL)

Arguments

ldf

S3 object of class loss_df

calendar1

the more recent calendar period to compare

calendar2

the older calendar period. Data at calendar2 will be subtracted from data at calendar1.

values

a vector of the names of the columns to be compared for changes. If NULL all comparable columns will be compared. If any column names are provided in values argument, the function will only compare the columns with the corresponding names.

Details

The motivation for claim_changes arose from the need to confirm that new claim data added to the database is consistent with the claim data already in the database. claim_changes produces a data frame consisting only of claims with changes in the selected values argument during the period between the calendar periods of interest. By scanning over all the claims that have changes one can quickly detect errors in the data (i.e. missing claims, an unexplainable decrease in paid losses, etc.). Additionally it is often beneficial when reserving to have claim detail to support the changes that occured, summarized on an origin level basis, from one reserve report to the next. A review of the claims that caused the change in the overall reserve can provide valuable information about how the losses may develop.

Examples

1
2
3
4
5
6
7
8
9
# return all claims with changes in all comparable columns in the 'loss_df'
claim_changes(ldf_data, calendar1 = 2013, calendar2 = 2012)

# return only claims with changes in 'paid_loss_only'
claim_changes(ldf_data, calendar1 = 2013, calendar2 = 2012, values = "paid_loss_only")

# return claims with changes in multiple 'values'
claim_changes(ldf_data, calendar1 = 2013, calendar2 = 2012,
        values = c("paid_loss_only", "incurred_loss_only", "claim_cts"))

merlinoa/lossdb documentation built on May 22, 2019, 6:52 p.m.