cpBlockMax  R Documentation 
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.
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, https://arxiv.org/abs/1507.06121.
cpDist()
for a related test based on the empirical d.f.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.