Articles by arthur charpentier

Are parallel computations worth it ?

May 31, 2013 | arthur charpentier

Yesterday, Daniel Marcelino published an interesting post on his blog, untitled Parallel Processing: When does it worth ? I was asking myself the same question for a chapter I am currently writing. And I did like his approach, so I tried, on my computer to do the same. I did use ... [Read more...]

Playing cards in Vegas?

May 19, 2013 | arthur charpentier

In a previous post, a few weeks ago, I mentioned that I will be in Las Vegas by the end of July. And I took the opportunity to write a post on roulette(s). Since some colleagues told me I should take some time to play poker there, I guess ... [Read more...]

From a random generator to a sample function

May 14, 2013 | arthur charpentier

This week-end, I wrote a post since I had some trouble to generate a sample random sample with R, to reproduce one obtained by a co-author, with SAS (generated using Fishman and Moore (1982) used in function RANUNI). I was lucky since another contributor for that book, Christrophe Dutang, got the ... [Read more...]

Playing cards, with R

May 11, 2013 | arthur charpentier

In my courses on R, I usually show how to insert a picture as a background for a graph. But it is also to see the picture as an object, and to insert it in a graph everywhere we like to see it, as explained on the awesome blog http://... [Read more...]

Reproducibility and randomness

May 11, 2013 | arthur charpentier

With Stéphane Tufféry, we were working this week on a chapter of a book, entitled Statistical Learning in Actuarial Science. The chapter should be based on R functions, and we wanted to reproduce some outputs he previously obtained with SAS. The good thing is that even complex functions (... [Read more...]

Poisson regression on non-integers

May 7, 2013 | arthur charpentier

In the course on claims reserving techniques, I did mention the use of Poisson regression, even if incremental payments were not integers. For instance, we did consider incremental triangles __ source("http://perso.univ-rennes1.fr/arthur.charpentier/bases.R") __ INC=PAID __ INC[,2:6]=PAID[,2:6]-PAID[,1:5] __ INC [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3209 1163 39 17 7 21 [2,] 3367 1292 37 24 10 NA [3,] 3871 1474 53 22 NA NA [4,] 4239 1678 103 NA NA NA [5,] 4929 1865 ... [Read more...]

LaTeX in R graphs

May 3, 2013 | arthur charpentier

A nice post was recently published on the rsnippets blog, about the tikzDevice R package. This package is – indeed – awesome. Even if it has been removed from the CRAN website. Of course, it can be download from the archive folder, on http://cran.r-project.org/…, but also (for a more ... [Read more...]

Animation, from R to LaTeX

May 3, 2013 | arthur charpentier

Just a short post, to share some codes used to generate animated graphs, with R. Assume that we would like to illustrate the law of large number, and the convergence of the average value from binomial sample. We can generate samples  using __ n=200 __ k=1000 __ set.seed(1) __ X=matrix(sample(0:1,size=... [Read more...]

Easter

March 31, 2013 | arthur charpentier

This morning, there was an interesting post entitled “why does Easter move around so much?” online on http://economist.com/blogs/economist-explains/… In my time series classes, I keep saying that sometimes, series can exhibit seasonlity, but the seasonal effect can be quite irregular. It is the cas for river ... [Read more...]

Benford law and lognormal distributions

March 28, 2013 | arthur charpentier

Benford’s law is nowadays extremely popular (see e.g. http://en.wikipedia.org/…). It is usually claimed that, for a given set data set, changing units does not affect the distribution of the first digit. Thus, it should be related to scale invariant distributions. Heuristically, scale (or unit) invariance ... [Read more...]

Rationality, and MS Excel (and other calculators)

March 27, 2013 | arthur charpentier

This morning, Mathieu had a nice experience in his course on computational method in actuarial science. But let us start with some mathematical formal definitions. First, recall that is – somehow – a standard expression. No one should be surprised to see such an expression. Generally (as explained in http://en.wikipedia.... [Read more...]

Happy St Patrick’s Day

March 17, 2013 | arthur charpentier

I love Saint Patrick’s Day for, at least, two reasons. The first one is that, on March 17th, you can play out loud The Pogues, the second one is that it’s the only day in the year when I really enjoy getting a Guiness in a pub. And ... [Read more...]

Comparing quantiles for two samples

March 8, 2013 | arthur charpentier

Recently, for a research paper, I some samples, and I wanted to compare them. Not to compare they means (by construction, all of them were centered) but there dispersion. And not they variance, but more their quantiles. Consider the following boxplot type function, where everything here is quantile related (which ... [Read more...]

Job for life ? Bishop of Rome ?

February 26, 2013 | arthur charpentier

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 ... [Read more...]

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

February 14, 2013 | arthur charpentier

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 1 21 24 15 [3,] 13 19 3 8 22 2 [4,] 20 12 14 16 4 10 I had to ... [Read more...]

Large claims, and ratemaking

February 13, 2013 | arthur charpentier

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 ... [Read more...]

Exposure with binomial responses

February 9, 2013 | arthur charpentier

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 ... [Read more...]
1 11 12 13 14 15 19

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)