ruinprob.test {bootruin} R Documentation

## A Bootstrap Test for the Probability of Ruin in the Classical Risk Process

### Description

This function provides a testing framework for the probability of ruin in the classical, compound Poisson risk process. The test can be performed using the bootstrap method or using normal approximation.

### Usage

```ruinprob.test(x, prob.null, type = c("bootstrap", "normal"),
nboot, bootmethod = c("nonp", "exp", "lnorm"), ...)
```

### Arguments

 `x` a numeric vector of data values (claims) `prob.null` a number indicating the hypothesized true probability of ruin. `type` a character string determining the type of test that is performed. `nboot` a number indicating the number of bootstrap replications. `bootmethod` a character string determining how the bootstrap replications are created. `...` further arguments to be passed to `ruinprob`.

### Details

The null hypothesis is that the probability of ruin is equal to `prob.null` versus the one-sided alternative that probability of ruin is smaller than `prob.null`.

If `type = "bootstrap"`, a bootstrap test is performed. The arguments `nboot` and `bootmethod` have to be specified. `bootmethod` determines the kind of bootstrap: `"nonp"` creates the usual nonparametric bootstrap replications, while `"exp"` and `"lnorm"` create parametric bootstrap replications, the former assuming exponentially distributed claims, the latter log-normally distributed ones.

`type = "normal"` makes use of an asymptotic normal approximation. The computations are a lot faster, but from a theoretical point of view the bootstrap method is more accurate, see References.

For details about the necessary and valid arguments that might have to be supplied for `...`, see `ruinprob`.

### Value

A list with class `"htest"` containing the following components:

 `statistic` the value of the studentized probability of ruin, i.e. the test statistic. `parameter` additional parameters. `p.value` the p-value for the test. `estimate` the estimated probability of ruin. `null.value` the specified hypothesized value of the probability of ruin. `alternative` a character string describing the alternative hypothesis. `method` a character string indicating what type of test was performed. `data.name` a character string giving the name of the data.

### Note

Using the bootstrap method is computationally intensive. Values for `nboot` should not be too large, usually numbers between 50 and 200 are reasonable choices.

### References

Baumgartner, B. and Gatto, R. (2010) A Bootstrap Test for the Probability of Ruin in the Compound Poisson Risk Process. ASTIN Bulletin, 40(1), pp. 241–255.

`ruinprob`

### Examples

```# 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",