Publications by arthur charpentier

Regression on categorical variables

30.01.2013

This morning, Stéphane asked me tricky question about extracting coefficients from a regression with categorical explanatory variates. More precisely, he asked me if it was possible to store the coefficients in a nice table, with information on the variable and the modality (those two information being in two different columns). Here is some cod...

2772 sym R (4413 sym/14 pcs) 22 img 1 tbl

Overdispersion with different exposures

01.02.2013

In actuarial science, and insurance ratemaking, taking into account the exposure can be a nightmare (in datasets, some clients have been here for a few years – we call that exposure – while others have been here for a few months, or weeks). Somehow, simple results because more complicated to compute just because we have to take into account t...

5748 sym R (4406 sym/9 pcs) 110 img

A random walk ? What else ?

02.02.2013

Consider the following time series, What does it look like ? I know, this is a stupid game, but I keep using it in my time series courses. It does look like a random walk, doesn’t it ? If we use Philipps-Perron test, yes, it does, > PP.test(x) Phillips-Perron Unit Root Test data: x Dickey-Fuller = -2.2421, Truncation lag parameter = 6,...

3182 sym R (1005 sym/6 pcs) 24 img

Natura non facit saltus

05.02.2013

(see John Wilkins’ article on the – interesting – history of that phrase http://scienceblogs.com/evolvingthoughts/…). We will see, this week in class, several smoothing techniques, for insurance ratemaking. As a starting point, assume that we do not want to use segmentation techniques: everyone will pay exactly the same price. no segmen...

6911 sym R (5239 sym/20 pcs) 56 img

Crash course on R for financial and actuarial econometrics

08.02.2013

Next Friday, I will give in Montréal a crash course entitled Econometric Modeling in Finance and Insurance with the R Language. Since IFM2 wanted this course to be an opportunity to discover R, the first part o fthe course will be on the R language. Slides can be downloaded from here. (since the course is still scheduled, all comments and remar...

1197 sym 8 img

Pills, half pills and probabilities

08.02.2013

Yesterday, I was uploading some old posts to complete the migration (I get back to my old posts, one by one, to check links of pictures, reformating R codes, etc). And I re-discovered a post published amost 2 years ago, on nuns and Hell’s Angels in an airplaine. It reminded me an old probability problem (that might be known as one on Feymann’...

3594 sym R (2608 sym/10 pcs) 56 img

Exposure with binomial responses

09.02.2013

Last week, we’ve seen how to take into account the exposure to compute nonparametric estimators of several quantities (empirical means, and empirical variances) incorporating exposure. Let us see what can be done if we want to model a binomial response. The model here is the following: , the number of claims  on the period  is unobserved the...

4322 sym R (2914 sym/11 pcs) 66 img

Large claims, and ratemaking

13.02.2013

During the course, we have seen that it is natural to assume that not only the individual claims frequency can be explained by some covariates, but individual costs too. Of course, appropriate families should be considered to model the distribution of the cost , given some covariates .Here is the dataset we’ll use, > sinistre=read.table("http:...

5293 sym R (2825 sym/9 pcs) 36 img

Sorting rows and colums in a matrix (with some music, and some magic)

14.02.2013

This morning, I was working on some paper on inequality measures, and for computational reasons, I had to sort elements in a matrix. To make it simple, I had a rectangular matrix, like the one below, > set.seed(1) > u=sample(1:(nc*nl)) > (M1=matrix(u,nl,nc)) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 7 5 11 23 6 17 [2,] 9 18 ...

3253 sym R (2593 sym/12 pcs) 28 img

Job for life ? Bishop of Rome ?

26.02.2013

The job of Bishop of Rome – i.e. the Pope – is considered to be a life-long commitment. I mean, it usually was. There have been 266 popes since 32 A.D. (according to http://oce.catholic.com/…): almost all popes have served until their death. But that does not mean that they were in the job for long… One can easily extract the data from th...

2155 sym R (1742 sym/7 pcs) 14 img