Blog Archives

Reserving based on log-incremental payments in R, part II

January 15, 2013
By
Reserving based on log-incremental payments in R, part II

Following on from last week's post I will continue to go through the paper Regression models based on log-incremental payments by Stavros Christofides . In the previous post I introduced the model from the first 15 pages up to section F. Today I will progress with sections G to K which illustrate the model with a...

Read more »

Reserving based on log-incremental payments in R, part I

January 8, 2013
By

A recent post on the PirateGrunt blog on claims reserving inspired me to look into the paper Regression models based on log-incremental payments by Stavros Christofides , published as part of the Claims Reserving Manual (Version 2) of the Institute of Actuaries.The paper is available together with a spread sheet model, illustrating the calculations. It...

Read more »

Clone all your gists locally with R

January 2, 2013
By

I really like gists as a quick way to include more lengthly code snippets into my blog posts. However, I am not a git user as such, and so I was quite concerned when I noticed that all my gists on this blog had vanished after Christmas. I suppose this was a result of Github's downtime...

Read more »

R in Insurance Conference, London, 15 July 2013

December 19, 2012
By
R in Insurance Conference, London, 15 July 2013

The first conference on R in Insurance will be held on Monday 15 July 2013 at Cass Business School in London, UK. The intended audience of the conference includes both academics and practitioners who are active or interested in the applications of R in insurance.This one-day conference will focus on applications in insurance...

Read more »

Now I see it! K-means cluster analysis in R

December 17, 2012
By
Now I see it! K-means cluster analysis in R

Of course, a picture on a computer monitor is a coloured plot of x and y coordinates or pixels. Still, I was smitten by David Sparks' posts on is.r(), where he shows how easy it is to read images into R to analyse them. In two posts , he replicates functionality of image manipulation...

Read more »

Comparing regions: maps, cartograms and tree maps

December 11, 2012
By
Comparing regions: maps, cartograms and tree maps

Last week I attended a seminar where a talk was given about the economic opportunities in the SAAAME (South-America, Asia, Africa and Middle East) regions. Of course a map was shown with those regions highlighted. The map was not that disimilar to the one below. library(RColorBrewer)library(rworldmap)data(countryExData)par(mai=c(0,0,0.2,0),xaxs="i",yaxs="i")mapByRegion( countryExData, ...

Read more »

Changing colours and legends in lattice plots

December 4, 2012
By
Changing colours and legends in lattice plots

Lattice plots are a great way of displaying multivariate data in R. Deepayan Sarkar, the author of lattice, has written a fantastic book about Multivariate Data Visualization with R . However, I often have to refer back to the help pages to remind myself how to set and change the legend and how to ensure that...

Read more »

Data.table rocks! Data manipulation the fast way in R

November 27, 2012
By
Data.table rocks! Data manipulation the fast way in R

I really should make it a habit of using data.table. The speed and simplicity of this R package are astonishing. Here is a simple example: I have a data frame showing incremental claims development by line of business and origin year. Now I would like add a column with the cumulative claims position for each line of...

Read more »

Claims reserving in R: ChainLadder 0.1.5-4 released

November 20, 2012
By

Last week we released version 0.1.5-4 of the ChainLadder package on CRAN. The R package provides methods which are typically used in insurance claims reserving. If you are new to R or insurance check out my recent talk on Using R in Insurance.The chain-ladder method which is a popular method in the insurance industry to forecast future...

Read more »

Simulating neurons or how to solve delay differential equations in R

November 13, 2012
By

I discussed earlier how the action potential of a neuron can be modelled via the Hodgkin-Huxely equations. Here I will present a simple model that describes how action potentials can be generated and propagated across neurons. The tricky bit here is that I use delay differential equations (DDE) to take into account the propagation time of the signal...

Read more »