Learn R Programming

mev (version 1.11)

smith.penult: Smith (1987) penultimate approximations

Description

The function takes as arguments the distribution and density functions. There are two options: method="bm" yields block maxima and the user should provide in such case the block sizes via the argument m. If instead method="pot" is provided, a vector of threshold values must be provided. The other argument (u or m depending on the method) is ignored.

Usage

smith.penult(densF, distF, ddensF = NULL, model = c("bm", "pot"), u, m,
  family, quantF = NULL, returnList = TRUE, ...)

Arguments

densF

density function; for standard statistical family family, given by dfamily

distF

distribution function, for standard statistical family family, given by pfamily

ddensF

derivative of the density function (optional)

model

either block maxima ("bm") or peaks-over-threshold ("pot") are supported

u

vector of thresholds for method "pot"

m

vector of block sizes for method "bm"

family

the name of the parametric family. Will be used to obtain dfamily, pfamily, qfamily

quantF

quantile function, default to NULL

returnList

logical; should the arguments be returned as a list or as a matrix of parameter

...

additional arguments passed to densF and distF

Value

a matrix or a list (if returnList) containing

  • loc: location parameters (method="bm")

  • scale: scale parameters

  • shape: shape parameters

  • u: thresholds (method="pot")

  • m: block sizes (method="bm")

References

Smith, R.L. (1987). Approximations in extreme value theory. Technical report 205, Center for Stochastic Process, University of North Carolina, 1--34.

Examples

Run this code
# NOT RUN {
#Threshold exceedance for Normal variables
qu <- seq(1,5,by=0.02)
penult <- smith.penult(densF=dnorm, distF=pnorm,
   ddensF=function(x){-x*dnorm(x)}, model="pot", u=qu)
plot(qu, penult$shape, type="l",xlab="Quantile",
   ylab="Penultimate shape",ylim=c(-0.5,0))
#Block maxima for Gamma variables -
#User must provide arguments for shape (or rate)
m <- seq(30,3650,by=30)
penult <- smith.penult(family = "gamma", model="bm", m=m, shape=0.1)
plot(m, penult$shape, type="l",
 xlab="Quantile", ylab="Penultimate shape")
# }

Run the code above in your browser using DataLab