Given an object with class "TVGEV" and a collection of time blocks (or period) defined by date, the distribution of the random maximum over the period \(M^\star := \max_b Y_b\) is known. The corresponding quantile function \(q_{M^\star}(m^\star)\) can be obtained.

# S3 method for TVGEV
quantMaxFun(object, date = NULL, psi = NULL, theta = NULL, ...)

Arguments

object

An object with class "TVGEV".

date

An object that can be coerced to the class "Date". If not provided this will be taken as the date attached to object.

psi

An optional vector of coefficients for object. By default the ML estimate as returned by coef(object) is used.

theta

An optional matrix with three columns containing GEV parameters. The colums are in the order location, scale and shape. When this argument is used neither date not psi can be used.

...

Not used.

Value

A function (more precisely, a closure). This function has a single formal argument p representing a probability

\(p\), and it returns the corresponding quantile \(q\)

such that

\(\text{Pr}\{M^\star \leq q \} = p\) where

\(M^\star\) is the random maximum.

Details

This function computes the quantile by using the distribution function \(F_{M^\star}\) returned by cdfMaxFun.TVGEV and the uniroot function to solve the equation \(F_{M^\star}(q) = p\). By contrast quantMax.TVGEV computes the values of the distribution values \(p_i\) corresponding to a grid of quantiles \(q_i\) and interpolates to find the quantiles corresponding to the probability values provided by the user. So small differences will exist in the results.

Caution

When theta is given model is not used. The quantile function is simply that of the maximum of independent r.vs following GEV distributions with their parameters given by (the rows of) theta.

See also

cdfMaxFun.TVGEV for the corresponding quantile function (or closure).

Examples

df <- within(TXMax_Dijon, Date <- as.Date(sprintf("%4d-01-01", Year)))
## fit a TVGEV model. Only the location parameter is TV.
res1 <- TVGEV(data = df, response = "TXMax", date = "Date",
              design = breaksX(date = Date, breaks = "1970-01-01", degree = 1),
              loc = ~ t1 + t1_1970)
qf <- quantMaxFun(res1)
qf(c(0.90, 0.99, 0.999))
#> [1] 40.21668 41.38380 42.22238

## a 'new period'
date <- as.Date(sprintf("%4d-01-01", 2025:2054))
qfNew <- quantMaxFun(res1, date = date)
qfNew(c(0.90, 0.99, 0.999))
#> [1] 42.11925 43.39069 44.24913