Learn R Programming

texmex (version 2.1)

texmex-internal: Internal functions for texmex

Description

Internal functions used by the texmex package.

Usage

"hist"(x, xlab, ylab, main, ...) qqevm(object, nsim = 1000, alpha = 0.05) ppevm(object, nsim = 1000, alpha = 0.05) qgpd2(N, sigma = 1, xi = 1, u = 0, la = 1) u2gpd(u, p=1, th=0, sigma, xi) mexTransform(x, method = "mixture", divisor = "n+1", na.rm=TRUE, margins="laplace") revTransform(x, data, qu, th=0, sigma=1, xi=0, method="mixture") evmFit(data, family, ..., prior="none", start=NULL, priorParameters = NULL, maxit = 10000, trace = 0, hessian = TRUE) gpd.info(o, method="observed") ConstraintsAreSatisfied(a,b,z,zpos,zneg,v) PosGumb.Laplace.negloglik(yex, ydep, a, b, m, s, constrain, v, aLow) PosGumb.Laplace.negProfileLogLik(yex, ydep, a, b, constrain, v, aLow) namesBoot2sim(bootobject) getPlotRLdata(object, alpha, RetPeriodRange) plotRLevm(M,xm,polycol,cicol,linecol,ptcol,n,xdat,pch,smooth,xlab,ylab, main,xrange,yrange) plotrl.evmOpt(object, alpha = 0.05, xlab, ylab, main, pch = 1, ptcol  = 2, cex = 0.75, linecol = 4, cicol = 0, polycol = 15, smooth = FALSE, RetPeriodRange = NULL) rFrechet(n) rMaxAR(n,theta) addCoefficients(o) addCovariance(o, family, cov) constructEVM(o, family, th, rate, prior, modelParameters, call, modelData, data, priorParameters, cov) texmexPst(msg, Family)

Arguments

x, object, data
Object to be used by plot functions, vector to be converted.
xlab, ylab, main, pch, cex, linecol, polycol, RetPeriodRange, ...
Arguments to plot functions.
N
Number of observations corresponding to N-observation return level to be calculated.
modelData
List containing response data and design matrices.
la
Rate at which threshold is exceeded.
alpha
Control nominal coverage of condfidence intervals. Defaults to alpha = 0.05.
nsim
Number of simulated datasets to use in computing confidence intervals.
u
Uniform deviates to be converted to GPD deviates.
p, th, qu, sigma, xi
Parameters of GPD distribution.
method
Argument to mexTransform: how to convert. When method = "mixture", the upper tail of the distribution is modelled using a generalized Pareto distribution and the remainder is approximated using the empirical distribution. Also argument to gpd.info which currently does nothing.
divisor
Divisor used in estimation of empirical distribution.
na.rm
Whether or not to remove missing values.
margins
Form of margins to which to transform x. Can take values margins="laplace" or margins="gumbel".
start, priorParameters, maxit, trace
Arguments supplied to gpd, migpd or mex, or inferred from those functions after some preprocessing.
hessian
Argument passed to optim. Logical.
o
An object of class 'evmOpt', or one containing elements of such an object.
a,b
Dependence parameters of the Heffernan and Tawn dependence model.
m,s
Nuisance parameters of the Heffernan and Tawn dependence model.
z,zpos,zneg
Quantiles of the residuals under the fitted Heffernan and Tawn model, asymptotic positive dependence and asymptotic negative dependence respectively.
v
Positive scalar, tuning parameter for constrained estimation of Heffernan and Tawn dependence model under estimation with Laplace marginal distributions.
constrain
Logical. Whether to carry out estimation of Heffernan and Tawn model parameters under correct stochastic ordering of fitted model and asymptotic positive/negative dependence models.
aLow
Lower bound for dependence parameter a. This depends on the marginal distribution under which the dependnece model is being fittted. Under Gumbel margins, the lower bound is 0 and under Laplace margins, the lower bouind is -1.
yex, ydep
Data for model estimation: yex is the explanatory variable on which the model conditions, and ydep is the dependent variable.
bootobject
Argument to namesBoot2bgpd which restructures an object of class evmBoot to resemble one of class evmSim, which can then use methods for the evmSim class.
M,xm,cicol,ptcol,n,xdat,smooth,xrange,yrange
Arguments to plotRLgpd which is a worker function, does the actual plotting for plotrl.evm, plot.rl.evmSim, plot.rl.evmBoot.
theta
Argument to rFrechet and rMaxAR, the dependence parameter theta. Takes values between 0 and 1, with 0 corresponding to perfect dependence and 1 to independence.
family, rate, prior, modelParameters, call, cov
Information used to obtain various components of an object of class 'evmOpt'.
msg, Family
A message to print and a Family

Details

None of these functions are intended to be used explicitly.

The plotting functions are used internally by plot.evmOpt.

Some of the code is based on code that appears in the ismev package, originally written by Stuart Coles, the evd package by Alec Stephenson and extRemes package by Eric Gilleland, Rick Katz and Greg Young.

Code to carry out estimation of H+T2004 under Laplace margins and constrained estimation was written by Yiannis Papastathopoulos, and is used here for validation purposes.