gpdCvm: Generalized Pareto Distribution Cramer-von Mises Test

Description Usage Arguments Details Value References Examples

Description

Cramer-von Mises goodness-of-fit test for the Generalized Pareto (GPD) distribution.

Usage

1
2
3
4
5
6
7
gpdCvm(
  data,
  bootstrap = FALSE,
  bootnum = NULL,
  allowParallel = FALSE,
  numCores = 1
)

Arguments

data

Data should be in vector form, assumed to be from the GPD.

bootstrap

Should bootstrap be used to obtain p-values for the test? By default, a table of critical values is used via interpolation. See details.

bootnum

Number of bootstrap replicates.

allowParallel

Should the bootstrap procedure be run in parallel or not. Defaults to false.

numCores

If allowParallel is true, specify the number of cores to use.

Details

A table of critical values were generated via Monte Carlo simulation for shape parameters -0.5 to 1.0 by 0.1, which provides p-values via log-linear interpolation from .001 to .999. For p-values below .001, a linear equation exists by regressing -log(p-value) on the critical values for the tail of the distribution (.950 to .999 upper percentiles). This regression provides a method to extrapolate to arbitrarily small p-values.

Value

statistic

Test statistic.

p.value

P-value for the test.

theta

Estimated value of theta for the initial data.

effective_bootnum

Effective number of bootstrap replicates if bootstrap based p-value is used (only those that converged are used).

References

Choulakian, V., & Stephens, M. A. (2001). Goodness-of-fit tests for the Generalized Pareto distribution. Technometrics, 43(4), 478-484.

Examples

1
2
3
# Generate some data from GPD
x <- rgpd(200, loc = 0, scale = 1, shape = 0.2)
gpdCvm(x)

Example output

$statistic
[1] 0.07670005

$p.value
[1] 0.254272

$theta
    Scale     Shape 
1.0345826 0.2150924 

eva documentation built on Jan. 13, 2021, 8:34 p.m.