0

I have an annoying problem regarding some R code I found on the net. Link is down below:

http://www.cybaea.net/journal/2012/03/13/R-code-for-Chapter-2-of-Non_Life-Insurance-Pricing-with-GLM/

I'm trying to understand the Case Study: Motorcycle Insurance part and have copied the code, doing some slight changes (the code has a rather old syntax).

My question is about the code part that begins with "You get the idea...", where we first define high.limit <- 7L. I have tried the code and it plots the same amount of diagrams, but they look completely different from graph on the page.

Mine:

enter image description here

The site's plot is directly under the part that begins with "high.limit <- 7L".

Can someone please tell me what's wrong?

Axeman
  • 32,068
  • 8
  • 81
  • 94
  • 3
    Please include all the relevant information in your question. The code, the data, the results... Everything. The example should be reproducible, meaning that if we copy and paste it into our R sessions, it should run and get the same or similar result as you. See more [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Roman Luštrik Jul 13 '17 at 06:20
  • Plots look almost the same? The slight differences are probably caused by the fact that the binning algorithm has somewhat changed. Also note that bar graphs don't make much sense on a log scale (where is zero?). – Axeman Jul 13 '17 at 08:01

0 Answers0