R/evir_repot.R
pot_refit.Rd
This is a slightly modified versions of the pot
function in the evir
package.
The main modification is to add to the returned object the argument
data
supplied by the user. This is added to the returned
(list) object with the name input_data
.
pot_refit(data, threshold = NA, nextremes = NA, run = NA, picture = TRUE, ...)
numeric vector of data, which may have a times attribute
containing (in an object of class "POSIXct"
, or an object that can
be converted to that class; see as.POSIXct
) the times/dates
of each observation. If no times attribute exists, the data are assumed to
be equally spaced.
a threshold value (either this or nextremes
must be
given but not both).
the number of upper extremes to be used (either this or
threshold
must be given but not both).
if the data are to be declustered the run length parameter for
the runs method (see decluster
) should be entered
here.
whether or not a picture should be drawn if declustering is performed.
arguments passed to optim
.
Bernhard Pfaff and Alexander McNeil (2018). evir: Extreme Values in R. R package version 1.7-4. https://CRAN.R-project.org/package=evir.
# We need the evir package
got_evir <- requireNamespace("evir", quietly = TRUE)
if (got_evir) {
library(evir)
data(danish)
out <- pot(danish, 10)
ls(out)
out <- pot_refit(danish, 10)
ls(out)
}
#> [1] "converged" "data" "input_data" "intensity"
#> [5] "n" "n.exceed" "nllh.final" "p.less.thresh"
#> [9] "par.ests" "par.ses" "period" "run"
#> [13] "span" "threshold" "varcov"