# mages' blog

## Notes from the 3rd R in Insurance Conference

 Photo: Arthur Charpentier
The R in Insurance conference in Amsterdam was a sold out success! Congratulations to the organising committee at the University of Amsterdam, and many thanks to our sponsors:

Milliman, RStudio, CYBAEA, Deloitte, a.s.r., Triple A Risk Finance, AEGON, Delta Lloyd Amsterdam, QBE Re and APPLIED AI

This one-day conference focused once more on applications in insurance and actuarial science that use R. Topics covered included reserving, pricing, loss modelling, the use of R in a production environment and more.

Next summer we are back in London at Cass Business School.

The slides are now available from the links in the agenda below.

## MacBook Air battery replacement

After four years of daily use our MacBook Air informed us that it needed a battery replacement. That's kind of nice to know, in particular as it still feels speedy and otherwise just works.

A new battery isn't that expensive and according to iFixit it appeared to be quite easy to replace it. I needn't to worry, it was actually super simple, given appropriate tools:

• Remove 10 screws from bottom case
• Open case
• Disconnect battery
• Remove 5 screws from battery
• Swap battery
• Reassemble everything back together
• Job done.
Although I cannot guarantee that it works for you as well, I would do it again.

Here are a few pictures of the surgery:

 Lower case with screws removed

 Old battery pack

 New battery pack

#### 1 comment :

Over the weekend we released version 0.2.1 of the ChainLadder package for claims reserving on CRAN.

### New Features

• New function PaidIncurredChain by Fabio Concina, based on the 2010 Merz & Wüthrich paper Paid-incurred chain claims reserving method
• Functions plot.MackChainLadder and plot.BootChainLadder gained new argument which, allowing users to specify which sub-plot to display. Thanks to Christophe Dutang for this suggestion.

 Output of plot(MackChainLadder(MW2014, est.sigma="Mack"), which=3:6)

### Changes

• Updated NAMESPACE file to comply with new R CMD checks in R-3.3.0
• Removed package dependencies on grDevices and Hmisc
• Expanded package vignette with new paragraph on importing spreadsheet data, a new section "Paid-Incurred Chain Model" and an added example for a full claims development picture in the "One Year Claims Development Result" section, see also [1] .

Binary versions of the package will appear on the various CRAN mirrors over the next couple of days. Alternatively you can install ChainLadder directly from GitHub using the following R commands:

install.packages(c(“systemfit”, “actuar", "statmod", "tweedie", "devtools"))
library(devtools)
library(ChainLadder)

### References

[1] Claims run-off uncertainty: the full picture. (with M. Merz) SSRN Manuscript, ID 2524352, 2014.

## Adding mathematical notations to R plots

I have to admit that I find the plotmath expressions in R a little fiddly to annotate plots with mathematical notation.

Apparently I am not the only one, but Stefano Meschiari did actually something about it. A few days ago his package latex2exp appeared on CRAN.

The package provides the wonderful function latex2exp that translates LaTeX code into plotmath expressions. Brillant! All I have to remember is to escape the "\" character, that is write "\\" instead of "\".

Below is the first example from the plotmath help file and again using latex2exp. I think this is much easier to read and write.

You find more information about latex2exp on Stefano's web site and his GitHub repository.

### Session Info

R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.4 (Yosemite)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] latex2exp_0.3.1

loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.2.1 Rcpp_0.11.6 stringi_0.5-5 stringr_1.0.0