Learn R Programming

loopevd (version 1.0.2)

raster_qevd: Return a raster of EVD Quantiles

Description

Return a raster of EVD Quantiles

Usage

raster_qevd(x, p, evd_mod_str, interval = NULL, lower.tail = TRUE)

Value

gives the quantile function corresponding to p

Arguments

x

SpatRasterDataset of EVD parameters, e.g. loc, scale, shape

p

probability value.

evd_mod_str

either a string "fgumbel", "fgev" or "fgumbelx" from the extreme value distribution (evd) in the evd package

interval

A length two vector containing the end-points of the interval to be searched for the quantiles, passed to the uniroot function.

lower.tail

Logical; if TRUE (default), probabilities are P \(x \le y\)), otherwise P (X > x).

See Also

evd::qgev(), evd::qgumbelx()

Examples

Run this code
require(terra)
r = rast(system.file("extdata/50km_AnnMax_agcd_v1_tmax_mean_r005_daily_1980-2019.nc",
                     package = "loopevd"))
r2 = aggregate(r,4) #lower the resolution for a fast example
gumbel_r = raster_fevd(r2,"fgumbel")
AEP_10pc = raster_qevd(gumbel_r,1-0.1,"fgumbel") # 10% Annual Exceedance Probability.

Run the code above in your browser using DataLab