I'm testing various pure premium models and want to make a Lorenz curve to compare the models. The goal is to show underwriters which models are better. I'm not sure if I'm doing it correctly.
I'm using my baseline as the 45 degree line. The y axis is percentage of actual cumulative pure premium ordered by my predicted pure premium and the x axis is percentage of cumulative exposure ordered by my predicted pure premium
The code looks like this
o <- with(glm.predictions, order(glm.predict)) x <- with(testData, cumsum(Exposure[o]) / sum(TIV_Pol_TermITV[o])) y <- with(testData, cumsum(Pure_Premium[o]) / sum(Pure_Premium[o])) dx <- x[-1] - x[-length(x)] h <- (y[-1] + y[-length(y)]) / 2 gini <- 2*(.5 - sum(h*dx)) # Lorenz Plot # plot(x = x, y = y, type = "n") lines( x = c(0,1), y = c(0,1), col = "grey") lines(x = x, y = y, col = "red")
Is it correct to have the actual pure premium on the y axis and order it by the predictive pure premium? The curve that is created looks like a typical Lorenz curve with a gini index of .48, but still don't have a full comprehension of a pure premium lorenz curve.