Skip to content

@PirateGrunt /gist:5922110
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
sourceFiles = "https://raw.github.com/PirateGrunt/MRMR/master/R/NAIC.R"
dummy = lapply(paste0(myDirectory, sourceFiles), source)
rm(myDirectory, sourceFiles, dummy)
dfAuto = GetNAICData(dataSetName = "comAuto_pos.csv")
dfWC = GetNAICData(dataSetName = "wkcomp_pos.csv")
dfGL = GetNAICData(dataSetName = "othliab_pos.csv")
dfProd = GetNAICData(dataSetName = "prodliab_pos.csv")
groups = intersect(unique(dfAuto$GroupName)
, unique(dfWC$GroupName)
, unique(dfGL$GroupName)
, unique(dfProd$GroupName))
groups = intersect(unique(dfAuto$GroupName), unique(dfWC$GroupName))
groups = intersect(groups, unique(dfGL$GroupName))
groups = intersect(groups, unique(dfProd$GroupName))
dfAuto = subset(dfAuto, GroupName %in% groups)
dfWC = subset(dfWC, GroupName %in% groups)
dfGL = subset(dfGL, GroupName %in% groups)
dfProd = subset(dfProd, GroupName %in% groups)
dfAuto$Line = "Auto"
dfWC$Line = "WC"
dfGL$Line = "GL"
dfProd$Line = "Products"
Multiline = rbind(dfAuto, dfWC, dfGL, dfProd)
rm(dfAuto, dfWC, dfGL, dfProd, groups)
myDirectory = "https://raw.github.com/PirateGrunt/MRMR/master/R/"
sourceFiles = c("TriangleOriginPeriod.R"
, "TriangleDevelopmentLag.R"
, "TriangleEvaluationDate.R"
, "TriangleOriginPeriod.R"
, "TriangleAdjustMeasures.R"
, "Triangle.R"
, "TriangleMeta.R")
dummy = lapply(paste0(myDirectory, sourceFiles), source)
measureCols = c("CumulativeIncurred", "CumulativePaid", "NetEP", "DirectEP", "CededEP", "IBNR")
MultilineTriangle = newTriangle(TriangleData = Multiline
, OriginPeriods = OriginPeriodStart
, OriginLength = years(1)
, StartDay = 1
, StartMonth = 1
, DevelopmentLags = DevelopmentLag
, DevelopmentPeriod = years(1)
, Groups = c("Line", "GroupName")
, Measures = measureCols
, Cumulative = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.