erlevd: Effective Return Levels

View source: R/fitdiagnostics.R

erlevdR Documentation

Effective Return Levels

Description

Find the so-called effective return levels for non-stationary extreme value distributions (EVDs).

Usage

erlevd(x, period = 100)

Arguments

x

A list object of class “fevd”.

period

number stating for what return period the effective return levels should be calculated.

Details

Return levels are the same as the quantiles for the GEV df. For the GP df, they are very similar to the quantiles, but with the event frequency taken into consideration. Effective return levels are the return levels obtained for given parameter/threshold values of a non-stationary model. For example, suppose the df for data are modeled as a GEV(location(t) = mu0 + mu1 * t, scale, shape), where ‘t’ is time. Then for any specific given time, ‘t’, return levels can be found. This is done for each value of the covariate(s) used to fit the model to the data. See, for example, Gilleland and Katz (2011) for more details.

This function is called by the plot method function for “fevd” objects when the models are non-stationary.

Value

A vector of length equal to the length of the data used to obtain the fit. When x is from a PP fit with blocks, a vector of length equal to the number of blocks.

Author(s)

Eric Gilleland

References

Gilleland, E. and Katz, R. W. (2011). New software to analyze how extremes change over time. Eos, 11 January, 92, (2), 13–14.

See Also

fevd, rlevd, rextRemes, pextRemes, plot.fevd

Examples


data(PORTw)

fit <- fevd(TMX1, PORTw, location.fun=~AOindex, units="deg C")
fit
tmp <- erlevd(fit, period=20)

## Not run: 
# Currently, the ci function does not work for effective
# return levels.  There were coding issues encountered.
# But, could try:
#
z <- rextRemes(fit, n=500)
dim(z)
# 500 randomly drawn samples from the
# fitted model.  Each row is a sample
# of data from the fitted model of the
# same length as the data.  Each column
# is a separate sample.

sam <- numeric(0)
for( i in 1:500) {
    cat(i, " ")
    dat <- data.frame(z=z[,i], AOindex=PORTw$AOindex)
    res <- fevd(z, dat, location.fun=~AOindex)
    sam <- cbind(sam, c(erlevd(res)))
}
cat("\n")

dim(sam)

a <- 0.05
res <- apply(sam, 1, quantile, probs=c(a/2, 1 - a/2))
nm <- rownames(res)

res <- cbind(res[1,], tmp, res[2,])
colnames(res) <- c(nm[1], "Estimated 20-year eff. ret. level", nm[2])
res


## End(Not run)

extRemes documentation built on Nov. 19, 2022, 1:07 a.m.