Coder Social home page Coder Social logo

kaybenleroll / carinsurance_pricing Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 12.0 29.72 MB

This repository illustrates some work in using GLMs to price car insurance based on car insurance policy and claim data. It also features some systematic data exploration and the use of MonteCarlo simulation to investigate the effectiveness of the pricing policies we are using.

License: Apache License 2.0

HTML 99.94% CSS 0.01% R 0.03% Dockerfile 0.01% Makefile 0.02%
glm montecarlo-simulation systematic-data insurance

carinsurance_pricing's People

Contributors

kaybenleroll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

carinsurance_pricing's Issues

prediction in log-normal regression

In 2.2.1 Iterating on Claim Size Prediction we can see:

ggplot(claimdata_dt) +
    geom_line(aes(x = claim_amount, y = claim_amount), size = 0.25) +
    geom_point(aes(x = claim_amount, y = exp(predict(model6, type = 'response')))
              ,size = 0.4, alpha = 0.2) +
    expand_limits(y = 0) +
    xlab("Claim Amount") +
    ylab("Predicted Amount")

we have a prediction for lognormal:

exp(predict(model6, type = 'response'))

If we do the mean of de predicted values probably the result will be much less than the empirical mean. After reading some literature I think that it should be:

sigma <- summary(model)$sigma
exp(predict(model))*exp(sigma^2/2)

What do you think?

Simulation coefficients equal to 0

Hello,

in 3.2 Simulation Using Standard Errors for Parameters there is a function called run_mc_sim and I see that inside the function:

as.vector(coef(arm::sim(claim_model_05, n.sim = 1)))

is always 0. When I use n.sim = 1 always all coef are equal to 0.

Is there something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.