Publications by Markus Gesmann
Simulating neurons or how to solve delay differential equations in R
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 tim...
1166 sym
Claims reserving in R: ChainLadder 0.1.5-4 released
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 futur...
1247 sym
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 business and each ...
1162 sym R (63 sym/1 pcs) 2 img
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 [1]. 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 the legend will use the same colou...
1346 sym R (212 sym/1 pcs) 4 img
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...
1801 sym R (359 sym/1 pcs) 2 img
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 [1], [2] he replicates functionality of image manipulation programmes like GIMP.I can't resist to write...
1872 sym R (617 sym/1 pcs) 2 img
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 and actuarial science...
2033 sym 2 img
Clone all your gists locally with R
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 on December 22nd.Thankfully an email to the suppor...
1101 sym
Reserving based on log-incremental payments in R, part I
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 [1], 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 calcula...
1795 sym R (193 sym/1 pcs)
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 [1]. 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 more realistic incremental cla...
2412 sym R (1104 sym/3 pcs) 2 img