R/quantMax.R
cdfMaxFun.TVGEV.Rd
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 distribution function can
be obtained.
# S3 method for TVGEV
cdfMaxFun(object, date = NULL, psi = NULL, theta = NULL, ...)
An object with class "TVGEV"
.
An object that can be coerced to the class
"Date"
. If not provided this will be taken as the date
attached to object
.
An optional vector of coefficients for
object
. By default the ML estimate as returned by
coef(object)
is used.
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.
A function (more precisely, a closure). This function has
a single formal argument q
representing a quantile, and
it returns the corresponding probability
\(\text{Pr}\{M^\star \leq q \}\).
When theta
is given model
is not
used. The distribution function is simply that of the maximum
of independent r.vs following GEV distributions with their
parameters given by (the rows of) theta
.
quantMaxFun.TVGEV
for the corresponding
quantile function (or closure).
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)
cdf <- cdfMaxFun(res1)
cdf(c(39.0, 41.0))
#> [1] 0.5190225 0.9766100
## a 'new period'
date <- as.Date(sprintf("%4d-01-01", 2025:2054))
cdfNew <- cdfMaxFun(res1, date = date)
cdfNew(c(39.0, 41.0))
#> [1] 0.03275412 0.62318687