rppvalue: P-values for the Test of the Probability of Ruin In bootruin: A Bootstrap Test for the Probability of Ruin in the Classical Risk Process

Description

This function provides p-values for the test of the probability of ruin using one of two different methods.

Usage

 1 rppvalue(x, method = c("bootstrap", "normal"), x.boot)

Arguments

 x The observed values of the test statistic as numeric vector or matrix, see Details. method A character string determining the method used. x.boot The bootstrap replications that x should be compared with, see Details.

Details

This function is not intended to be used by itself, but rather in combination with rpteststat. Hence, ideally, both x and x.boot stem from a call of the latter.

If method = "bootstrap", then bootstrap p-values are computed. The values of x are compared to those of x.boot. The number of rows of x.boot has to match the number of columns of x (or its length if it is a vector). For most applications, however, x will be a single number and x.boot will be the bootstrap replications of x

For method = "normal" the p-values are computed using the asymptotic normal approximation of the test statistic. x can be a vector, a matrix or an array of numerics.

The elements of x are interpreted as statistics of separate, independent tests, and adjusting the p-values for multiple comparison may be necessary.

Value

A numeric (vector, matrix or array) with the same dimension as x.

Note

If method = "normal", the argument x.boot is not used and a warning is issued if it is still provided.

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.