knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The intention of the package is to provide simulation methods of common risk processes in a framework of ruin theory. Each model is implemented as an S4 class, having a simulator of its path, and a plotting function. Further, a Monte-Carlo estimator of a ruin probability for a finite time is implemented, using a parallel computation. Currently, the package extends two classical risk models, namely, Cramer-Lundberg and Sparre Andersen models by including capital injections (positive jumps).
The package is not yet submitted to CRAN. Instead, you can install ruin
from
github with:
# install.packages("devtools") devtools::install_github("irudnyts/ruin")
library(ruin) model <- CramerLundberg( initial_capital = 10, premium_rate = 1, claim_poisson_arrival_rate = 1, claim_size_generator = rexp, claim_size_parameters = list(rate = 1) ) ruin_probability(model = model, time_horizon = 10, return_paths = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.