410 likes | 672 Vues
R In Actuarial Pricing Teams. Chibisi Chima-Okereke Mango Solutions. Agenda. Actuarial Survey Geographical Area. UK Actuaries & CAS (Casualty Actuarial Society). Source Palisade ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf. Main Areas Of Work.
E N D
R In Actuarial Pricing Teams Chibisi Chima-Okereke Mango Solutions
Actuarial Survey Geographical Area UK Actuaries & CAS (Casualty Actuarial Society) Source Palisade ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf
Main Areas Of Work UK Actuaries & CAS (Casualty Actuarial Society) Source Palisade 2006 ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf
Main area of work in which software is used UK Actuaries & CAS (Casualty Actuarial Society) Source Palisade ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf
Percentage of respondents using each package UK Actuaries & CAS (Casualty Actuarial Society) Source Palisade ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf
Use of Statistical Packages Percentage of statistical package users using individual packages UK Actuaries & CAS (Casualty Actuarial Society) Source Palisade ( @Risk ): http://www.palisade.com/downloads/pdf/Pryor.pdf
R is the programminglanguage of statistics Spreadsheets are unstructured computer programs: The Risks Of Using Spreadsheets for Statistical Analysis (IBM White Paper): http://public.dhe.ibm.com/common/ssi/ecm/en/imw14297usen/IMW14297USEN.PDF
Current Actuarial R Packages http://cran.r-project.org/web/packages/
Example Data Data Source (Simulated): Modern Actuarial Risk Theory Using R: Kaas, Goovaerts, Dhaene, and Denuit.
require(RODBC) doMyAnalysis <- function(myYear = 2001){ sqlString <- paste("SELECT * FROM policyClaims WHERE Year='",myYear,"'", sep = "") myData <- sqlQuery(channel = odbcConnect(dsn = "InsuranceData"), query = sqlString) odbcCloseAll() myGlm <- glm(noclaims ~ age + bonusmalus + region + mileage, data = myData, offset = log(exposure), family = poisson(link = "log")) myCoeffs <- summary(myGlm)$coeff theNames <- colnames(myCoeffs) myCoeffs <- data.frame(myCoeffs) myCoeffs <- data.frame(rownames(myCoeffs), myYear, myCoeffs) colnames(myCoeffs) <- c("Coeff", "Year", theNames) print(myYear) return(myCoeffs[1,]) } analysisOutPut <- lapply(2001:2010, doMyAnalysis) analysisOutPut <- do.call(rbind, analysisOutPut) rownames(analysisOutPut) <- 1:nrow(analysisOutPut) Dynamic SQL Query Example
myFun<- function(x){ hist(x$GrossIncurred, col = "blue", xlab = "GIC", main = paste("Histogram of GIC for bonus malus \n group ", x$BonusMalus[1], " and year ", x$Year[1], sep = "")) } pdf(file = paste(myFolder, "myPlots.pdf", sep = ""), width = 7, height = 7) by(policyTable, list("Year" = policyTable$Year, "BonusMalus" = policyTable$BonusMalus), FUN = myFun) dev.off() Plotting Analysis C:\Users\cchima-okereke\Documents\R\RScripts\ActuarialPricing\tmp\myPlots.pdf
Effects package effects package from John Fox: http://www.jstatsoft.org/v08/i15/paper