|
Project Information
Featured
Downloads
Links
|
NEWS [25 March 2012] Version 0.1.5-2 of the ChainLadder package has been released. Please join the R-SIG-insurance mailinglist, the Special Interest Group on using R in actuarial science and insurance. OverviewChainLadder (google code name chainladder) is an R package providing methods which are typically used in insurance claims reserving. The package started out of presentations given at the Stochastic Reserving Seminar at the Institute of Actuaries in 2007 and 2008, followed by talks at CAS meetings in 2008 and 2010. The package started with implementations of the Mack-, Munich- and Bootstrap-chain-ladder methods. Since version 0.1.3-3 it also provides general multivariate chain ladder models by Wayne Zhang. Version 0.1.4-0 introduces new functions on LDF fitting and Cape Cod by Daniel Murphy following a paper by David Clark. Version 0.1.5-0 has added loss reserving models within the generalized linear model framework following a paper by England P. and Verrall R. (1999) implemented by Wayne Zhang. The package offers also some utility functions to convert quickly tables into triangles, triangles into tables, cumulative into incremental and incremental into cumulative triangles. The ChainLadder-package comes with an example spreadsheet which demonstrates how to use the ChainLadder functions in Excel. The spreadsheet is located in the Excel folder of the package. The R command system.file("Excel", package="ChainLadder") will tell you the exact path to the directory. To use the spreadsheet you will need the RExcel-Addin. The package also provides an example SWord file, demonstrating how the the functions of the package can be integrated into a MS Word file via SWord. Again you find the Word file via the command: system.file("SWord", package="ChainLadder") InstallationFrom CRANStart R on your computer and type: install.packages('ChainLadder')Of course, don't forget the R Installation and Administration manual. From Google CodeR under Windows
R under Linux / Mac OS X
Using ChainLadderAfter you installed the package type into R: library('ChainLadder')Type library(help='ChainLadder') or ?ChainLadder to see overall documentation. Type demo(ChainLadder) to get an idea of the functionality of this package. See demo(package='ChainLadder') for a list of more demos. DocumentationExamples
Presentations
Useful links
NewsVersion 0.1.5-2
================
NEW FEATURES
o Started writing a vignette. The current version is still draft
and far from complete. Feedback will be much appreciated.
Changes
o Removed .Internal call to make ChainLadder compliant with R 2.15.0
o Changed argument "t" in plot.triangle to "type" in order to be
consistent with plot.default
Bug Fixes
o as.triangle() gave triangles back, with development periods not
ordered, when the input data frame had unordered development
periods in different units, e.g. dev=c(1,100,10)
Thanks to Ben Escoto for reporting this issue.
Version 0.1.5-1
================
Changes
o Internal changes to plot.MackChainLadder to pass new checks
introduced by R 2.14.0.
o Commented out unnecessary creation of 'io' matrix in ClarkCapeCod
function. Allows for analysis of very large matrices for CapeCod
without running out of RAM. 'io' matrix is an integral part of
ClarkLDF, and so remains in that function.
o plot.clark method
- Removed "conclusion" stated in QQplot of clark methods.
- Restore 'par' settings upon exit
- Slight change to the title
o Reduced the minimum 'theta' boundary for weibull growth function
o Added warnings to as.triangle if origin dev. period are not numeric
Version 0.1.5-0
================
NEW FEATURES
o New function glmReserve, which implements loss reserving models
within the generalized linear model framework following a paper by
England P. and Verrall R. (1999)
Version 0.1.4-3.4
================
Changes
o Updates to the internal MunichChainLadder function to reflect more
rigours checks by R for function arguments (introduced by R 2.13.0)
Version 0.1.4-3
================
NEW FEATURES
o ClarkLDF and ClarkCapeCod functions were reorganized to clarify
the delivery and presentation of the methods' results
- Individual components now contain distinct values within
Clark's methodologies
- 'summary' methods produce "reports" that display results in
the form of typical loss development and Bornhuetter-Ferguson
exhibits
- "Table" functions now produce the results as shown in the
tables on pp. 64, 65 and 68 of Clark's paper
- A 'vcov' method produces the covariance matrix of the
estimated parameters
o An 'ata' function exists to calculate the "age-to-age" development
factors of a loss "triangle", as well as the simple and volume
weighted averages
Version 0.1.4-2
================
BUG FIXES
o The TruncatedGrowth function value under the Clark Cape Cod method
was incorrectly printed in the Table68 data.frame when the
calculations were to be based on the average date of loss
(argument adol=TRUE). The underlying calculations used the correct
adol adjustment, only the printed output was incorrect.
Version 0.1.4-1
================
NEW FEATURES
o ClarkLDF and ClarkCapeCod functions: additional functionality
- Clark's methods now work for "one-row triangles" -- i.e.,
loss experience from only one origin period
- Clark's methods work for "phase-shifted" triangles -- i.e.,
triangles whose first age does not coincide with the end of
the origin period. Example: accident year origin periods with
September 30th evaluation dates.
o A 'vcov' method now exists to produce the covariance matrix of the
estimated parameters using the approach in Clark's paper
o Additional values (in lists) returned by Clark's methods:
- FI = Fisher Information matrix as Clark defines it in his
paper (i.e., without the sigma^2 value)
- dR = the gradient of the reserves function evaluated at the
optimal parameter values
- value = value of the loglikelihood function at the solution
- counts = number of evaluations of the loglikelihood and its
derivative before convergence
o Fine-tuning of maximum likelihood numerical algorithm's control
parameters
- Enable more consistent convergence properties between R's
32-bit and 64-bit environments
- Initial starting values for the weibull function were
adjusted for successful convergence across a wider set of
triangles
- Upper bounds introduced for "L-BFGS-B" maximum likelihood
method to bound weibull away from unity at too early an age
o If the solution is found at the boundary of the parameter region,
it is conceivable that a "more optimal" solution might exist if the
boundary constraints were not as conservative, so a warning is given
BUG FIXES
o The parameters returned by the methods were the scaled versions;
they now at their original scales.
o The loss development factor (LDF) being returned by ClarkCapeCod
was not documented
Version 0.1.4-0
================
NEW FEATURES
o New implementation of the methods in David Clark's "LDF Curve
Fitting" paper in the 2003 Forum by Daniel Murphy.
- Includes LDF and CapeCod methods (functions 'ClarkLDF' and
'ClarkCapeCod', respectively)
- Programmed to handle loglogistic and weibull growth
functions
- Printing an object returned by the function results in a
table similar to that on p. 65 of the paper
- Plotting such an object results in four residual plots,
including a Q-Q plot with the results of the Shapiro-Wilk test
Version 0.1.3-4
================
BUG FIXES
o 'residuals.MackChainLadder': Zero weights applied to
MackChainLadder caused an error.
Thanks to Ernesto Schirmacher for reporting this bug.
Version 0.1.3-3
================
NEW FEATURES
o New multivariate chain ladder function 'MultiChainLadder' by Wayne
(Yanwei) Zhang <actuaryzhang@uchicago.edu>
o New function 'getLatestCumulative' available. It returns for a
given triangle the most recent values for each origin period.
o New demos! Type demo(package='ChainLadder') for more information.
o Demos exist for the following topics: ChainLadder,
MackChainLadder, DatabaseExamples, MSOffice, MultiChainLadder
o New SWord example file ChainLadder_SWord_Example.doc, which
demonstrates how R code snippets can be integrated into a Word
file. The following R command system.file("SWord",
package="ChainLadder") will show the directory of the file.
USER-VISIBLE CHANGES
o The examples in MackChainLadder and ChainLadder-package have been
shortened and demo files have been created instead.
The examples focus on the syntax of the function calls, while the
demos give more detailed information on how you might want to use
the functions in a business context.
BUG FIXES
o 'plot.MunichChainLadder': The labels of the axis of the residuals
plots where the mixed up. Thanks to Ben Escoto for reporting this
issue.
o 'estimate.sigma' didn't check for sigma>0 before applying a
log-linear regression. Thanks to Dan Murphy reporting this bug.
Version 0.1.2-13
================
USER-VISIBLE CHANGES
o 'MackChainLadder' has new argument 'alpha' as an additional
weighting parameter. As a result, the argument 'weights' is now
just that, weights should be between 0 and 1. The argument
'alpha' describes the different chain ladder age-to-age factors:
The default for alpha for all development periods is 1. See
Mack's 1999 paper: alpha=1 gives the historical chain ladder
age-to-age factors, alpha=0 gives the straight average of the
observed individual development factors and alpha=2 is the result
of an ordinary regression with intercept 0.
o Basic 'chainladder' function now available using linear
models. See ?chainladder for more information.
o More examples for 'MackChainLadder' demonstrate how to apply the
MackChainLadder over several triangles in 'one-line'.
o 'as.data.frame.triangle' has new argument 'lob' (e.g. line of
business) which allows to set an additional label column in the
data frame output.
BUG FIXES
o 'MackChainLadder': Latest position of incomplete triangles were
in some cases not returned correctly. Thanks to Ben Escoto for
reporting and providing a patch.
o 'MackChainLadder':
- Mack.S.E was not correctly calculated for non-standard chain
ladder age-to-age factors (e.g. straight averages or ordinary
regression through the origin) due the missing argument
for 'alpha'.
- Chain ladder age-to-age factors were always applied to diagonal
elements to calculate forecasts, although data in sub-diagonal
triangle could exist.
Many thanks to Przemyslaw Sloma for reporting those issues.
Version 0.1.2-12
================
NEW FEATURES
o New triangle class with S3 methods for plot, print and conversion
from triangles to data.frames and vis versa
o New utility functions 'incr2cum' and 'cum2incr' to convert
incremental triangles into cumulative triangles and vis
versa. Thanks to Chritophe Dutang.
o New logical argument lattice for plot.MackChainLadder (and
plot.triangle), which allows to plot developments by origin period
in separate panels.
BUG FIXES
o 'MunichChainLadder': tail factors were not accepted. Thanks to
Stefan Pohl for reporting this issue.
Version 0.1.2-11
===============
BUG FIXES
o 'MackChainLadder': 'F.se'[ultimate] was calculated of the ultimate
column instead of the latest paid.
Version 0.1.2-10
===============
USER-VISIBLE CHANGES
o 'MackChainLadder' has new arguments 'tail.sigma' and 'tail.se' to
provide estimates of the variability for a given tail factor.
BUG FIXES
o 'MackChainLadder': calculation of 'Mack.S.E' did not use an
ultimate sigma factor to estimate
'Mack.S.E' when a tail factor > 1 was provided
(Thanks to Mark Hoffmann for reporting this issue).
Version 0.1.2-9
===============
USER-VISIBLE CHANGES
o Updated documentation to work with new Rd-file parser (R version
>= 2.9.0)
o Updated documentation for 'ABC' data (Thanks to Glen Barnett)
Version 0.1.2-8
===============
USER-VISIBLE CHANGES
o Updated documentation for 'MackChainLadder'
(Thanks to Daniel Murphy)
Version 0.1.2-7
===============
USER-VISIBLE CHANGES
o 'MackChainLadder' gives two more elements back: 'Mack.ProcessRisk'
and 'Mack.ParameterRisk' for the process and parameter risk error
(Thanks to Daniel Murphy)
o In the summary output of'MackChainLadder' the label 'CV' changed
to 'CV(IBNR)' to clarify that we show the coefficient of variance of the IBNR.
o 'MackChainLadder' provides new example plots for CV(IBNR)
vs. origin period and CV(Ultimate) vs. origin period
o Updated documentation
Version 0.1.2-6
===============
USER-VISIBLE CHANGES
o Updated documentation
Version 0.1.2-5
===============
NEW FEATURES
o New function 'BootChainLadder', based on papers by England and Verrall,
and Barnett and Zehnwirth
o 'MackChainLadder' and 'MunichChainLadder' allow for tail factors
o 'MackChainLadder' estimates the overall standard error for the total IBNR
o New arguments 'tail' and 'est.sigma' for MackChainLadder, to control
the tail factor and the estimation of sigma_{n-1}
o New arguments 'tailP', 'tailI' and 'est.sigmaP', 'est.sigmaI' for
'MunichChainLadder', which are passed on to 'MackChainLadder' to control
the tail factor and the estimation of sigma_{n-1} for the Paid and
Incurred triangle
o 'Mack-, 'Munich-, and 'BootChainLadder' accept (mxn) matrices with m>=n,
e.g more accident years than development years
o New example data sets: 'ABC' (annual run-off triangle of a worker's
compensation portfolio of a large company), 'qpaid', 'qincurred' ('made-up'
data of a quarterly development triangle of annual origin period)
o Triangles with higher development period frequency (e.g quarterly) than
origin period frequency (e.g annual) can be used after being 'blown-up'
to a common period frequency, see the help of 'qpaid'
o 'Mack-, 'Munich- and 'BootChainLadder' accept 'blown-up' triangles of
higher development period frequency than origin period frequency filled
with 'NA', see the help of 'qpaid'
USER-VISIBLE CHANGES
o summary functions for 'Mack-, 'Munich-, 'BootChainLadder' give all a list
back with two elements: 'ByOrigin' and 'Totals'
o Change of labels: origin years -> origin period and development years ->
development origin
o Coefficient of Variance is abbreviate with 'CV' instead of 'CoV'
o The example spreadsheet 'ChainLadder_in_Excel.xls' has new examples,
including 'BootChainLadder'
o New greeting message after the R-call 'library(ChainLadder)'
o Improved documentation
BUG FIXES
o 'MunichChainLadder': calculation of 'lambdaP' and 'lambdI' was incorrect.
Thanks to Beat Huggler for reporting this issue.
2008-09-23 Markus Gesmann <markus.gesmann@gmail>
* R/BootstrapReserve.R Included all the functions for the BootChainLadder
function. The BootChainLadder procedure provides a predictive
distribution of reserves for a cumulative claims development
triangle.
* R/BootstrapReserve.R, MackChainLadder.R, MunichChainLadder The summary
methods for MackChainLadder, MunichChainLadder, BootChainLadder
give a list back with two elements "ByOrigin" and "Totals"
* R/zzz.R Included a .onLoad function to produce a little message
after the ChainLadder package is loaded.
* Excel/ChainLadder_in_Excel.xls Added new examples for
BootChainLadder and how to use Rapply to call functions from the
ChainLadder package.
2008-09-18 Markus Gesmann <markus.gesmann@gmail.com>
* R/MackChainLadder.R Included tail factor estimation. The
function MackChainLadder has a new argument "tail" to either
estimate the tail factor via a log-linear regression or to set it manually.
* data/qpaid.RData, qincurred.RData Added examples of quarterly
development triangles
2008-09-08 Markus Gesmann <markus.gesmann@gmail.com>
* R/MackChainLadder.R Prepared the functions Mack.S.E and
Total.Mack.S.E to accept triangles with rows full of NA values.
This might be useful for non quadratic triangles
2008-05-19 Markus Gesmann <markus.gesmann@gmail.com>
* R/MackChainLadder.R Bug fix: Function Mack.S.E did not give F.se back,
which is needed by TotalMack.S.E.
Many thanks to Florian Leitenstorfer for reporting this issue.
2008-05-11 Markus Gesmann <markus.gesmann@gmail.com>
* inst/Excel/ChainLadder_in_Excel.xls uses now dynamic functions
and shows how to call 'plot' from Excel
* R/MackChainLadderFunctions.R: Changed labels Reserving to IBNR
(=Incurred But Not Reported)
2008-02-02 Markus Gesmann <markus.gesmann@gmail.com>
* R/MackChainLadderFunctions.R: Mack.S.E checks now which sigma>0 before log
linear regression of sigma to estimate sigma[n-1]
2008-02-11 Markus Gesmann <markus.gesmann@gmail.com>
* R/MackChainLadderFunctions.R: added function
TotalMack.S.E function to estimate the overall standard error for
the reserve. MackChainLadder gives now also the
Total.Mack.S.E. back plus the estimate standard error for all
individual age-to-age factors F.se.
|