# Generating a sample of 50 exponentially distributed claims with mean 10
x <- rexp(50, 0.1)
## Not run:
# # Given this sample, test whether the probability of ruin is smaller than
# # 0.1 using a bootstrap test with 100 bootstrap replications.
# ruinprob.test(
# x = x, prob.null = 0.10, type = "bootstrap",
# loading = 0.2, reserve = 100, interval = 1,
# bootmethod = "nonp", nboot = 100
# )
# ## End(Not run)
# The same test using normal approximation. This is a lot faster.
ruinprob.test(
x = x, prob.null = 0.15, type = "normal",
loading = 0.2, reserve = 100, interval = 1
)
Run the code above in your browser using DataLab