cpBlockMax: Nonparametric Tests for Change-Point Detection in the...

Description Usage Arguments Details Value Note References See Also Examples

View source: R/cpTests.R

Description

Nonparametric tests for change-point detection in the distribution of independent block maxima based either on the probability weighted moment method (see the second reference) or on the generalized probability weighted moment method (see the first reference) for estimating the parameters of the generalized extreme value (GEV) distribution. It is assumed that the block maxima are independent and that their unknown distribution functions (d.f.s) are continuous, but not necessarily that they are GEV distributed. Three statistics are computed. Under the assumption that the block maxima are GEV distributed, these are statistics particularly sensitive to changes in the location, scale and shape parameters of the GEV. Details can be found in third reference.

Usage

1
cpBlockMax(x, method = c("pwm", "gpwm"), r=10)

Arguments

x

a numeric vector representing independent block maxima whose unknown d.f.s are assumed continuous.

method

a string specifying how statistics will be defined; can be either "pwm" (the probability weighted moment method) or "gpwm" (the generalized probability weighted moment method). The method "pwm" is suggested for climate block maxima that are typically not too heavy tailed, more precisely, whose distributions are in the maximum domains of attraction of GEV distributions with shape parameters smaller than a half. The method "gpwm" should be preferred otherwise.

r

strictly positive integer specifying the set of breakpoints that will be tested; more precisely, starting from the initial sample of block maxima, the tests compare subsamples formed by the k first maxima and n-k last maxima for k in the set {r,...,n-r}, where n is the sample size.

Details

Approximate p-values are computed from the estimated asymptotic null distributions, which involve the Kolmogorov distribution. The latter is dealt with reusing code from the ks.test() function; credit to RCore.

Value

An object of class htest which is a list, some of the components of which are

statistic

value of the three test statistics.

pvalues

corresponding approximate p-values.

stats.loc

the values of the n - (2 * r - 1) intermediate change-point statistics sensitive to changes in the location; the first test statistic is defined as the maximum of those.

stats.scale

the values of the n - (2 * r - 1) intermediate change-point statistics sensitive to changes in the scale; the second test statistic is defined as the maximum of those.

stats.shape

the values of the n - (2 * r - 1) intermediate change-point statistics sensitive to changes in the shape; the third test statistic is defined as the maximum of those.

Note

The tests were derived under the assumption of block maxima with continuous d.f., which implies that ties occur with probability zero. A way to deal with ties based on randomization is proposed in the third reference.

References

J. Diebolt, A. Guillou, P. Naveau and P. Ribereau (2008), Improving probability-weighted moment methods for the generalized extreme-value distribution, REVSTAT 6, pages 33-50.

J.R.M. Hosking, J.R. Wallis and E.F. Wood (1985), Estimation of the generalized extreme-value distribution by the method of probability-weighted moments, Technometrics 27, pages 251-261.

I. Kojadinovic and P. Naveau (2017), Nonparametric tests for change-point detection in the distribution of block maxima based on probability weighted moments, Extremes 20:2, pages 417-450, http://arxiv.org/abs/1507.06121.

See Also

cpDist() for a related test based on the empirical d.f.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
require(evd)
n <- 100
k <- 50 ## the true change-point

## Change in the shape parameter of a GEV
x <- rgev(k,loc=0,scale=1,shape=-0.8)
y <- rgev(k,loc=0,scale=1,shape=0.4)
cp <- cpBlockMax(c(x,y))
cp
## Estimated change-point
which(cp$stats.shape == max(cp$stats.shape))

## Change in the scale parameter of a GEV
x <- rgev(k,loc=0,scale=0.5,shape=0)
y <- rgev(k,loc=0,scale=1,shape=0)
cp <- cpBlockMax(c(x,y))
cp
## Estimated change-point
which(cp$stats.scale == max(cp$stats.scale))

## Change in the location parameter of a GEV
x <- rgev(k,loc=0,scale=1,shape=0)
y <- rgev(k,loc=0.5,scale=1,shape=0)
cp <- cpBlockMax(c(x,y))
cp
## Estimated change-point
which(cp$stats.loc == max(cp$stats.loc))
## End(Not run)

Example output

Loading required package: evd

	Test for change-point detection in the distribution of block maxima
	with 'method'="pwm"

data:  c(x, y)
loc.stat = 1.21890, scale.stat = 0.55244, shape.stat = 3.42500,
p.value.loc = 0.17262000, p.value.scale = 1.00000000, p.value.shape =
0.00042823

shape39 
     30 

	Test for change-point detection in the distribution of block maxima
	with 'method'="pwm"

data:  c(x, y)
loc.stat = 1.01870, scale.stat = 1.75330, shape.stat = 0.61759,
p.value.loc = 1.1926e-01, p.value.scale = 3.2245e-06, p.value.shape =
7.0744e-01

scale50 
     41 

	Test for change-point detection in the distribution of block maxima
	with 'method'="pwm"

data:  c(x, y)
loc.stat = 2.04320, scale.stat = 0.70483, shape.stat = 0.59191,
p.value.loc = 0.0054313, p.value.scale = 0.8413700, p.value.shape =
0.7652400

loc42 
   33 

npcp documentation built on July 16, 2020, 5:07 p.m.

Related to cpBlockMax in npcp...