Package: cascsim 0.4
cascsim: Casualty Actuarial Society Individual Claim Simulator
It is an open source insurance claim simulation engine sponsored by the Casualty Actuarial Society. It generates individual insurance claims including open claims, reopened claims, incurred but not reported claims and future claims. It also includes claim data fitting functions to help set simulation assumptions. It is useful for claim level reserving analysis. Parodi (2013) <https://www.actuaries.org.uk/documents/triangle-free-reserving-non-traditional-framework-estimating-reserves-and-reserve-uncertainty>.
Authors:
cascsim_0.4.tar.gz
cascsim_0.4.zip(r-4.5)cascsim_0.4.zip(r-4.4)cascsim_0.4.zip(r-4.3)
cascsim_0.4.tgz(r-4.4-any)cascsim_0.4.tgz(r-4.3-any)
cascsim_0.4.tar.gz(r-4.5-noble)cascsim_0.4.tar.gz(r-4.4-noble)
cascsim_0.4.tgz(r-4.4-emscripten)cascsim_0.4.tgz(r-4.3-emscripten)
cascsim.pdf |cascsim.html✨
cascsim/json (API)
# Install 'cascsim' in R: |
install.packages('cascsim', repos = c('https://windwill.r-universe.dev', 'https://cloud.r-project.org')) |
- claimdata - Sample Claim Data
This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.
Last updated 5 years agofrom:8eddb5ccd1. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 19 2024 |
R-4.5-win | OK | Nov 19 2024 |
R-4.5-linux | OK | Nov 19 2024 |
R-4.4-win | OK | Nov 19 2024 |
R-4.4-mac | OK | Nov 19 2024 |
R-4.3-win | OK | Nov 19 2024 |
R-4.3-mac | OK | Nov 19 2024 |
Exports:CDFPlotclaimFittingclaimSampleclaimSimulationcopulaDataPlotcopulaFitcopulaFitPlotcopulaPlotcopulaSampledempiricalDensitydoPlotdoSampledparetodtbetadtempiricaldtexpdtgammadtgeomdtlnormdtnbinomdtnormdtparetodtpoisdtweibullexpectZerosfitPlotgetCopulagetIndexgetObservationgetTrendmparetonloglikobservationPlotPDFPlotpempiricalplotTextpparetoPPPlotProbabilityptbetaptempiricalptexpptgammaptgeomptlnormptnbinomptnormptparetoptpoisptweibullqempiricalqparetoQQPlotqtbetaqtempiricalqtexpqtgammaqtgeomqtlnormqtnbinomqtnormqtparetoqtpoisqtweibullQuantilerempiricalrparetorreopenrtbetartempiricalrtexprtgammartgeomrtlnormrtnbinomrtnormrtparetortpoisrtweibullsampleKurtosissampleMeansampleSdsampleSkewsetAnnualizedRate<-setCopulaParam<-setCopulaType<-setDevFacsetDf<-setDimension<-setDispstr<-setEmpirical<-setFacModel<-setFitdatasetfitmethod<-setFittedDist<-setfreq<-setFun<-setID<-setidate<-setifreq<-setIndexsetMarginal<-setMeanList<-setMinsetMonthlyIndex<-setObservation<-setParams<-setParas<-setprobs<-setRange<-setSeasonality<-setTabulate<-setTrend<-setTrialDist<-setTrialDistErr<-setTruncated<-setUpperKeepsetUpperTrianglesetVolList<-setXname<-setYearlyIndex<-shiftIndexsimP0simReportsimSummarysimTriangleTEKurtTMeantoDatetruncateTSDTSkewnessultiDevFac
Dependencies:ADGofTestcolorspacecopulafitdistrplusgsllatticeMASSMatrixmomentsmvtnormnumDerivpcaPPpsplineR2HTMLrlangscatterplot3dstabledistsurvival
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Plotting the CDF of data and fitted distribution | CDFPlot CDFPlot,ANY-method CDFPlot,FitDist-method |
Chi-Squared Test | ChiSqrTest ChiSqrTest,ANY-method ChiSqrTest,FitDist-method |
Sample Claim Data | claimdata |
Claim data fitting analysis at line/type/status level | claimFitting claimFitting,ANY-method claimFitting,Simulation,data.frame-method |
Claim simulation at line/type/status level | claimSample claimSample,ANY-method claimSample,ClaimType-method |
Claim simulation at line/type/status level | claimSimulation claimSimulation,ANY-method claimSimulation,Simulation-method |
An S4 class to represent a claim type. | ClaimType-class |
Experience data plotting. | copulaDataPlot copulaDataPlot,ANY-method copulaDataPlot,CopulaObj-method |
Copula fitting | copulaFit copulaFit,ANY-method copulaFit,CopulaObj-method |
Visualization Copula fitting | copulaFitPlot copulaFitPlot,ANY-method copulaFitPlot,CopulaObj-method |
An S4 class to represent a copula object to model the correlation. | CopulaObj-class |
Copula plotting. Only for 2 or 3 variables | copulaPlot copulaPlot,ANY-method copulaPlot,CopulaObj-method |
Copula sampling. It will generate correlated variables or percentiles when marginal distributions are not specified. | copulaSample copulaSample,ANY-method copulaSample,CopulaObj,numeric-method |
Density function. | Density Density,ANY-method Density,Beta-method Density,Empirical-method Density,Exponential-method Density,Gamma-method Density,Geometric-method Density,Lognormal-method Density,NegativeBinomial-method Density,Normal-method Density,Pareto-method Density,Poisson-method Density,Uniform-method Density,Weibull-method |
An S4 class to represent a loss development schedule. | DevFac-class |
An S4 class to represent a distribution, either parametric or non-parametric. | Distribution-class |
Plot function. | doPlot doPlot,ANY-method doPlot,Distribution-method |
Sampling from the distribution. | doSample doSample,ANY-method doSample,Beta,numeric-method doSample,Empirical,numeric-method doSample,Exponential,numeric-method doSample,Gamma,numeric-method doSample,Geometric,numeric-method doSample,Lognormal,numeric-method doSample,NegativeBinomial,numeric-method doSample,Normal,numeric-method doSample,Pareto,numeric-method doSample,Poisson,numeric-method doSample,Uniform,numeric-method doSample,Weibull,numeric-method |
Density function of Truncated Beta Distribution | dtbeta ptbeta qtbeta rtbeta |
Density function of truncated empirical distribution | dtempirical ptempirical qtempirical rtempirical |
Density function of Truncated Exponential Distribution | dtexp ptexp qtexp rtexp |
Density function of Truncated Gamma Distribution | dtgamma ptgamma qtgamma rtgamma |
Density function of Truncated Geometric Distribution | dtgeom ptgeom qtgeom rtgeom |
Density function of Truncated Lognormal Distribution | dtlnorm ptlnorm qtlnorm rtlnorm |
Density function of Truncated Negative Binomial Distribution | dtnbinom ptnbinom qtnbinom rtnbinom |
Density function of Truncated Normal Distribution | dtnorm ptnorm qtnorm rtnorm |
Density function of Truncated Pareto Distribution | dtpareto ptpareto qtpareto rtpareto |
Density function of Truncated Poisson Distribution | dtpois ptpois qtpois rtpois |
Density function of Truncated Weibull Distribution | dtweibull ptweibull qtweibull rtweibull |
Get the expected P0 based on settlement/close year. | expectZeros |
An S4 class to represent distribution fitting. | FitDist-class |
Compare the raw data and fitted distribution on density, CDF, Q-Q plot and P-P plot | fitPlot fitPlot,ANY-method fitPlot,FitDist-method |
Get the R copula object. | getCopula getCopula,ANY-method getCopula,CopulaObj-method |
Retrieve index value based on dates. | getIndex getIndex,ANY-method getIndex,Index-method |
Get input data from an object. | getObservation getObservation,ANY-method getObservation,FitDist-method |
Get the trend index. | getTrend getTrend,ANY-method getTrend,FitDist-method |
An S4 class to represent a time index for frequency or severity distribution. | Index-class |
K-S Test | KSTest KSTest,ANY-method KSTest,FitDist-method |
Moment function of Pareto Distribution (PDF: alpha*xm^alpha/x^(alpha+1)) | dpareto mpareto ppareto qpareto rpareto |
Negative Loglikelihood. | nloglik |
Plotting the data for distribution fitting | observationPlot observationPlot,ANY-method observationPlot,FitDist-method |
Plotting the PDF of data and fitted distribution | PDFPlot PDFPlot,ANY-method PDFPlot,FitDist-method |
Cumulative probability function of empirical distribution using linear interpolation | dempirical pempirical qempirical rempirical |
Plot text content | plotText |
P-P Plot of data and fitted distribution | PPPlot PPPlot,ANY-method PPPlot,FitDist-method |
Probability function. | Probability Probability,ANY-method Probability,Beta-method Probability,Empirical-method Probability,Exponential-method Probability,Gamma-method Probability,Geometric-method Probability,Lognormal-method Probability,NegativeBinomial-method Probability,Normal-method Probability,Pareto-method Probability,Poisson-method Probability,Uniform-method Probability,Weibull-method |
Q-Q Plot of data and fitted distribution | QQPlot QQPlot,ANY-method QQPlot,FitDist-method |
Quantile function. | Quantile Quantile,ANY-method Quantile,Beta-method Quantile,Empirical-method Quantile,Exponential-method Quantile,Gamma-method Quantile,Geometric-method Quantile,Lognormal-method Quantile,NegativeBinomial-method Quantile,Normal-method Quantile,Pareto-method Quantile,Poisson-method Quantile,Uniform-method Quantile,Weibull-method |
Simulate whether closed claims will be reopened or not. | rreopen |
Calculate the excess kurtosis of 10000 sampled values from the distribution. | sampleKurtosis sampleKurtosis,ANY-method sampleKurtosis,Distribution-method |
Calculate the mean of 100000 sampled values from the distribution. | sampleMean sampleMean,ANY-method sampleMean,Distribution-method |
Calculate the standard deviation of 10000 sampled values from the distribution. | sampleSd sampleSd,ANY-method sampleSd,Distribution-method |
Calculate the skewness of 10000 sampled values from the distribution. | sampleSkew sampleSkew,ANY-method sampleSkew,Distribution-method |
Set the annualized level rate to construct the index. Only used when tabulate == FALSE. | setAnnualizedRate,ANY-method setAnnualizedRate<- setAnnualizedRate<-,Index,numeric-method |
Set copula parameters. | setCopulaParam,ANY-method setCopulaParam<- setCopulaParam<-,CopulaObj,numeric-method |
Set copula type. | setCopulaType,ANY-method setCopulaType<- setCopulaType<-,CopulaObj,character-method |
Set up an IBNER loss development schedule. | setDevFac setDevFac,ANY-method setDevFac,DevFac-method |
Set the degree of freedom for t Copula. | setDf,ANY-method setDf<- setDf<-,CopulaObj,numeric-method |
Set the dimension of the copula. | setDimension,ANY-method setDimension<- setDimension<-,CopulaObj,numeric-method |
Set parameter matrix format of Elliptical copula. | setDispstr,ANY-method setDispstr<- setDispstr<-,CopulaObj,character-method |
Set the list of values and corresponding probabilities (Pr(X<value) for continuous variable and Pr(X==value) for discrete variable). It is only used for empirical distribution. | setEmpirical,ANY-method setEmpirical<- setEmpirical<-,Distribution,matrix-method |
Determine whether the development factor is determined by a predictive model or a fixed schedule by development year | setFacModel,ANY-method setFacModel<- setFacModel<-,DevFac,logical-method |
Preparing the input data (observation) for distribution fitting, including detrending, translating occurrence dates to frequency data, etc. | setFitdata setFitdata,ANY-method setFitdata,FitDist-method |
Set distribution fitting method. | setfitmethod,ANY-method setfitmethod<- setfitmethod<-,FitDist,character-method |
Directly set the fitted distribution without fitting it to the data. | setFittedDist,ANY-method setFittedDist<- setFittedDist<-,FitDist,Distribution-method |
Set the data frequency. | setfreq,ANY-method setfreq<- setfreq<-,FitDist,character-method |
Set the model format/link function (identity/inverse/log/exponential). Only used when FacModel == TRUE. | setFun,ANY-method setFun<- setFun<-,DevFac,character-method |
setID Set the ID for an object | setID,ANY-method setID<- setID<-,DevFac,character-method setID<-,Index,character-method |
Set whether occurrence dates will be used for frequency data. | setidate,ANY-method setidate<- setidate<-,FitDist,logical-method |
Set the data type: frequency or severity/time lag. | setifreq,ANY-method setifreq<- setifreq<-,FitDist,logical-method |
Set up a time index for frequency or severity. | setIndex setIndex,ANY-method setIndex,Index-method |
Set the marginal distributions of the copula. | setMarginal,ANY-method setMarginal<- setMarginal<-,CopulaObj,list-method |
Set the year-to-year loss development factor. | setMeanList,ANY-method setMeanList<- setMeanList<-,DevFac,vector-method |
Set the minimum of the distribution. For example, the distribution of settlement lag for open claims | setMin setMin,ANY-method setMin,Distribution-method |
Set monthly index values. | setMonthlyIndex,ANY-method setMonthlyIndex<- setMonthlyIndex<-,Index,vector-method |
Input the raw data. | setObservation,ANY-method setObservation<- setObservation<-,CopulaObj,matrix-method setObservation<-,FitDist,matrix-method |
Set distribution parameters. | setParams,ANY-method setParams<- setParams<-,Distribution,numeric-method |
Set the values of model parameters. | setParas,ANY-method setParas<- setParas<-,DevFac,vector-method |
Set the percentiles to be matched. Only used when qme is chosen for fitting method. | setprobs,ANY-method setprobs<- setprobs<-,FitDist,vector-method |
Set the min and max of the variable. | setRange,ANY-method setRange<- setRange<-,Distribution,numeric-method |
Set up the rectangle based on simulated data. | setRectangle setRectangle,ANY-method setRectangle,Triangle,data.frame-method |
Set seasonality on a monthly basis. | setSeasonality,ANY-method setSeasonality<- setSeasonality<-,Index,vector-method |
Set the start date for the claim simulation exercise | setStartDate,ANY-method setStartDate<- setStartDate<-,Index,Date-method |
Determine whether the index values are constructed from a constant rate or provided directly | setTabulate,ANY-method setTabulate<- setTabulate<-,Index,logical-method |
Set the trend with an Index Object. | setTrend,ANY-method setTrend<- setTrend<-,FitDist,Index-method |
Distribution fitting and testing. | setTrialDist,ANY-method setTrialDist<- setTrialDist<-,FitDist,Distribution-method |
Distribution fitting and testing. Same as setTrialDist except for error tolerance. | setTrialDistErr,ANY-method setTrialDistErr<- setTrialDistErr<-,FitDist,Distribution-method |
Set the indicator of truncated distribution. | setTruncated,ANY-method setTruncated<- setTruncated<-,Distribution,logical-method |
Set up the upper triangle for non-simulated data. | setUpperKeep setUpperKeep,ANY-method setUpperKeep,Triangle,data.frame-method |
Set up the upper triangle based on claim data. | setUpperTriangle setUpperTriangle,ANY-method setUpperTriangle,Triangle,data.frame-method |
Set the year-to-year loss development factor volatility. | setVolList,ANY-method setVolList<- setVolList<-,DevFac,vector-method |
Set additional explanatory variable names. | setXname,ANY-method setXname<- setXname<-,DevFac,vector-method |
Set yearly index values. | setYearlyIndex,ANY-method setYearlyIndex<- setYearlyIndex<-,Index,vector-method |
Shift monthly index with a new start date and replace the unknown index value with zero. | shiftIndex shiftIndex,ANY-method shiftIndex,Index-method |
Simulate whether claims will have zero payment. | simP0 |
Generate claim simulation result report in html | simReport simReport,ANY-method simReport,Simulation,data.frame-method |
Claim simulation result summary | simSummary simSummary,ANY-method simSummary,Simulation,data.frame-method |
Claim simulation result triangles | simTriangle simTriangle,ANY-method simTriangle,Simulation,data.frame,data.frame-method |
An S4 class to represent a simulation task. | Simulation-class |
Calculate Theoretical Excessive Kurtosis of distribution. min and max are not applied | TEKurt TEKurt,ANY-method TEKurt,Beta-method TEKurt,Exponential-method TEKurt,Gamma-method TEKurt,Geometric-method TEKurt,Lognormal-method TEKurt,NegativeBinomial-method TEKurt,Normal-method TEKurt,Pareto-method TEKurt,Poisson-method TEKurt,Uniform-method TEKurt,Weibull-method |
Calculate Theoretical Mean of distribution. min and max are not applied | TMean TMean,ANY-method TMean,Beta-method TMean,Exponential-method TMean,Gamma-method TMean,Geometric-method TMean,Lognormal-method TMean,NegativeBinomial-method TMean,Normal-method TMean,Pareto-method TMean,Poisson-method TMean,Uniform-method TMean,Weibull-method |
Convert US date mm/dd/yyyy to yyyy-mm-dd format | toDate |
An S4 class to represent a triangle or rectangle object. | Triangle-class |
Truncate a numeric vector | truncate |
Calculate Theoretical Standard Deviation of distribution. min and max are not applied | TSD TSD,ANY-method TSD,Beta-method TSD,Exponential-method TSD,Gamma-method TSD,Geometric-method TSD,Lognormal-method TSD,NegativeBinomial-method TSD,Normal-method TSD,Pareto-method TSD,Poisson-method TSD,Uniform-method TSD,Weibull-method |
Calculate Theoretical Skewness of distribution. min and max are not applied | TSkewness TSkewness,ANY-method TSkewness,Beta-method TSkewness,Exponential-method TSkewness,Gamma-method TSkewness,Geometric-method TSkewness,Lognormal-method TSkewness,NegativeBinomial-method TSkewness,Normal-method TSkewness,Pareto-method TSkewness,Poisson-method TSkewness,Uniform-method TSkewness,Weibull-method |
Calculate ultimate development factor based on current development year, a mean development factor schedule and its volatility. It is used to simulate the ultimate loss for open claims. | ultiDevFac |