Description Usage Arguments Details Examples
Given a data.table of claimvaluations (i.e. with columns "ValuationDate", "ClaimID", ...), return claim-level subsets of the data.
1 2 3 |
claimvaluations |
data.table object with columns "ValuationDate", "ClaimID". Depending on the exact call to claims_at(...), other columns may be required. |
valuationDate |
return all claims valued as of this date |
claimAge |
return all claims as of this age, as measured in months since DateOfLoss |
policyAge |
return all claims valued at the time their policy is this age, as measured in months since Effective Date |
maxValuationDate |
don't return claims valued after this date |
dropImmatureValuations |
should claims be excluded in the result if their first valuation date is before maxValuationDate? |
colmap_claimvaluations |
named vector of column mapping |
One may return
E.g. "claims valued as of 2016-12-31"
E.g. "claims valued as of age = 9 months"
E.g. "claims at the instant their policy is of age = 12 months"
Here, "claim age" refers to the number of months since the date of loss (DateOfLoss) while "policy age" refers to the number of months
since the effective date. Additionally, the parameter maxValuationDate
may be provided to prevent results which have
future valuation dates. For example, if claimvaluations has monthly valuations from Jan 2010 thru Dec 2016, specifying
maxValuationDate = as.Date("2016-12-31")
and calling claims_at(claimvaluationz, claimAge = 2) will discard all claims
which occured in Novemeber and December of 2016.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(lubridate)
library(data.table)
# Sample claim valuations
claimvaluationz
# View claims as they were valued on 2015-06-30
claims_at(claimvaluationz, valuationDate = as.Date("2015-06-30"))
# View each claim at age = 12 months
claims_at(claimvaluationz, claimAge = 12)
# View each claim at age = 12 months, assuming the data is valued as of 2016-03-01
claims_at(claimvaluationz, claimAge = 12, maxValuationDate = as.Date("2016-03-01"))
# View claims as they were valued when each policy was age = 12 months
claims_at(claimvaluationz, policyAge = 12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.