gev.tem: Tangent exponential model approximation for the GEV...

View source: R/profile.R

gev.temR Documentation

Tangent exponential model approximation for the GEV distribution

Description

The function gev.tem provides a tangent exponential model (TEM) approximation for higher order likelihood inference for a scalar parameter for the generalized extreme value distribution. Options include location scale and shape parameters as well as value-at-risk (or return levels). The function attempts to find good values for psi that will cover the range of options, but the fail may fit and return an error.

Usage

gev.tem(
  param = c("loc", "scale", "shape", "quant", "Nmean", "Nquant"),
  dat,
  psi = NULL,
  p = NULL,
  q = 0.5,
  N = NULL,
  n.psi = 50,
  plot = TRUE,
  correction = TRUE
)

Arguments

param

parameter over which to profile

dat

sample vector for the GEV distribution

psi

scalar or ordered vector of values for the interest parameter. If NULL (default), a grid of values centered at the MLE is selected

p

tail probability for the (1-p)th quantile (return levels). Required only if param = 'retlev'

q

probability level of quantile. Required only for param Nquant.

N

size of block over which to take maxima. Required only for param Nmean and Nquant.

n.psi

number of values of psi at which the likelihood is computed, if psi is not supplied (NULL). Odd values are more prone to give rise to numerical instabilities near the MLE. If psi is a vector of length 2 and n.psi is greater than 2, these are taken to be endpoints of the sequence.

plot

logical indicating whether plot.fr should be called upon exit

correction

logical indicating whether spline.corr should be called.

Value

an invisible object of class fr (see tem in package hoa) with elements

  • normal: maximum likelihood estimate and standard error of the interest parameter \psi

  • par.hat: maximum likelihood estimates

  • par.hat.se: standard errors of maximum likelihood estimates

  • th.rest: estimated maximum profile likelihood at (\psi, \hat{\lambda})

  • r: values of likelihood root corresponding to \psi

  • psi: vector of interest parameter

  • q: vector of likelihood modifications

  • rstar: modified likelihood root vector

  • rstar.old: uncorrected modified likelihood root vector

  • param: parameter

Author(s)

Leo Belzile

Examples

## Not run: 
set.seed(1234)
dat <- rgev(n = 40, loc = 0, scale = 2, shape = -0.1)
gev.tem('shape', dat = dat, plot = TRUE)
gev.tem('quant', dat = dat, p = 0.01, plot = TRUE)
gev.tem('scale', psi = seq(1, 4, by = 0.1), dat = dat, plot = TRUE)
dat <- rgev(n = 40, loc = 0, scale = 2, shape = 0.2)
gev.tem('loc', dat = dat, plot = TRUE)
gev.tem('Nmean', dat = dat, p = 0.01, N=100, plot = TRUE)
gev.tem('Nquant', dat = dat, q = 0.5, N=100, plot = TRUE)

## End(Not run)

mev documentation built on Sept. 11, 2024, 8:14 p.m.