raster_qevd: Return a raster of EVD Quantiles

View source: R/loopFuns.R

raster_qevdR Documentation

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)

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).

Value

gives the quantile function corresponding to p

See Also

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

Examples

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.

loopevd documentation built on June 23, 2025, 5:09 p.m.