Description Usage Arguments Details Value Note References See Also Examples
Nonparametric tests for changepoint 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.
1  cpBlockMax(x, method = c("pwm", "gpwm"), r=10)

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 
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

Approximate pvalues 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.
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 pvalues. 
stats.loc 
the values of the 
stats.scale 
the values of the 
stats.shape 
the values of the 
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.
J. Diebolt, A. Guillou, P. Naveau and P. Ribereau (2008), Improving probabilityweighted moment methods for the generalized extremevalue distribution, REVSTAT 6, pages 3350.
J.R.M. Hosking, J.R. Wallis and E.F. Wood (1985), Estimation of the generalized extremevalue distribution by the method of probabilityweighted moments, Technometrics 27, pages 251261.
I. Kojadinovic and P. Naveau (2017), Nonparametric tests for changepoint detection in the distribution of block maxima based on probability weighted moments, Extremes 20:2, pages 417450, http://arxiv.org/abs/1507.06121.
cpDist()
for a related test based on the empirical d.f.
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 changepoint
## 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 changepoint
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 changepoint
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 changepoint
which(cp$stats.loc == max(cp$stats.loc))
## End(Not run)

Loading required package: evd
Test for changepoint 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 changepoint 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.1926e01, p.value.scale = 3.2245e06, p.value.shape =
7.0744e01
scale50
41
Test for changepoint 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.