interpolateSn: Function to compute LD (location-dispersion) estimates

interpolateSnR Documentation

Function to compute LD (location-dispersion) estimates

Description

Function LDEstimator provides a general way to compute estimates for a given parametric family of probability measures (with a scale and shape parameter) which can be obtained by matching location and dispersion functionals against empirical counterparts.

Usage

getShapeGrid(gridsize=1000, centralvalue=0.7,
             withPos=TRUE, cutoff.at.0=1e-4, fac = 2)

getSnGrid(xiGrid = getShapeGrid(), PFam=GParetoFamily(), low=0,
                      upp=1.01, accuracy = 10000, GridFileName="SnGrid.Rdata",
                      withPrint = FALSE)

Arguments

gridsize

integer; the size of the grid to be created.

centralvalue

numeric of length 1: the central value of the grid (for details see below).

withPos

logical of length 1; are negative values for the shape forbidden?

cutoff.at.0

numeric of length 1: How close may we come to 0?

fac

a scaling factor used for the respective grid values (see below).

xiGrid

numeric; grid of shape values.

PFam

an object of class "ParamFamily". The parametric family at which to evaluate the LDEstimator; the respective (main) parameter must contain "scale" and "shape".

low

numeric; argument for Sn.

upp

numeric; argument for Sn.

accuracy

numeric; argument for Sn.

GridFileName

character; if GridFileName!="", the pure y-grid values are saved under this filename.

withPrint

logical of length 1: shall current shape value be printed out?

Details

getShapeGrid is a helper function to produce an unequally spaced grid of shape values xi, with the rationale that we need values close to some typical values more often than values at the border. The code starts with an equally spaced grid of size gridsize from 0.5 to 1-0.25/gridsize. This is reflected at 0.5, and a grid of respective quantiles of Norm(mean=centralvalue, sd=fac) is produced—with the heuristic rational that most estimators will be asymptotically normal around a typical value. If withPos is TRUE, negative values are cut off and replaced by respective higher quantiles of the corresponding normal; similarly, values to close to 0 are replaced by values between the cutoff value and the next admissible value and again by respective higher normal quantiles.

getSnGrid is a helper function to produce a grid of Sn values for a given grid of shape values and scale equal to 1 in a given shape-scale family. This result of this function can then be used to speed up calls to Sn (or to medSn) by providing particular methods for Sn. For an example of such a particular method see the body of getMethod("Sn", "GPareto") where object sng[["Generalized Pareto Family"]] is just the result of a call getSnGrid(xiGrid = getShapeGrid(), PFam=GParetoFamily()) which has been stored in the namespace of package distrMod.

Value

getShapeGrid

a numeric grid of xi-values.

getSnGrid

a grid, i.e.; a matrix with columns xi and Sn–the respective interpolation grid).

Author(s)

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

Examples

## (empirical) Data
getShapeGrid(50)
head(getShapeGrid(withPos=FALSE))

## Not run: 
### code used for the grid stored in the namespace of distrMod:
getSnGrid()

## End(Not run)

RobExtremes documentation built on Feb. 12, 2024, 3:01 a.m.