View source: R/coefvariation.R
cvselect | R Documentation |
This function computes the empirical coefficient of variation and computes a weighted statistic comparing the squared distance with the theoretical coefficient variation corresponding to a specific shape parameter (estimated from the data using a moment estimator as the value minimizing the test statistic, or using maximum likelihood). The procedure stops if there are no more than 10 exceedances above the highest threshold
cvselect(
xdat,
thresh,
method = c("mle", "wcv", "cv"),
nsim = 999L,
nthresh = 10L,
level = 0.05,
lazy = FALSE
)
xdat |
[vector] vector of observations |
thresh |
[vector] vector of threshold. If missing, set to |
method |
[string], either moment estimator for the (weighted) coefficient of variation ( |
nsim |
[integer] number of bootstrap replications |
nthresh |
[integer] number of thresholds, if |
level |
[numeric] probability level for sequential testing procedure |
lazy |
[logical] compute the bootstrap p-value until the test stops rejecting at level |
a list with elements
thresh
: value of threshold returned by the procedure, NA
if the hypothesis is rejected at all thresholds
cthresh
: sorted vector of candidate thresholds
cindex
: index of selected threshold among cthresh
or NA
if none returned
pval
: bootstrap p-values, with NA
if lazy
and the p-value exceeds level at lower thresholds
shape
: shape parameter estimates
nexc
: number of exceedances of each threshold cthresh
method
: estimation method for the shape parameter
del Castillo, J. and M. Padilla (2016). Modelling extreme values by the residual coefficient of variation, SORT, 40(2), pp. 303–320.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.