# Extreme Value Trawls

## Documentation for package ‘ev.trawl’ version 0.1.0

- DESCRIPTION file.

## Help Pages

CollectionTrawl | Creates a list of trawl functions given a type of trawl and a vector of times as peak times. Has the option to get primitives. Note that only exponential trawl are implemented so far.
ComputeAExp | Wrapper to compute total area under exponential trawl function.
ComputeB1Exp | Wrapper to compute difference area between 't2' and 't1' under exponential trawl function.
ComputeB3Exp | Wrapper to compute difference area between 't1' and 't2' under exponential trawl function.
ComputeBInterExp | Wrapper to compute intersection area between 't1' and 't2' under exponential trawl function.
DiffVal | Centered differentiation calculation.
dlgpd | Computes the probability density function of Generalised Pareto Distribution at x, with shape parameter alpha and scale parameter beta.
EvaluateF | Evalutae function at given parameters.
FullPL | Computes latent trawl FULL pairwise likelihood depending with exponential trawl function.
GammaBox | Sample Gamma with small shape parameter 'alpha*dx*dy'.
GammaSqBox | Wrapper for GammaBox using a square to multiply the shape parameter.
GenerateParameters | Computes initial guess for Univariate Latent-Trawl model. Uses 'fExtreme' package method 'gpdFit' to fit MLE.
GetEstimateRho | Computes first-order estimate for 'rho'.
GPDFit | Generalised Pareto likelihood maximisation using L-BFGS-B optimisation routine.
GradF | Computes gradident of a function given parameters and offset value epsilon.
HessianF | Computes Hessian matrix of a $C^2$ function given parameters and offset value epsilon
hourly_bloomsbury_air_pollution_2000_2017 | Hourly measurements of 6 air pollutant concentrations in Bloomsbury, London, UK.
MarginalGPDLikelihood | Computes Generalised Pareto (log-)likelihood on non-zero exceedances under independence.
MarginalSimpleLik | Simplified marginal (GPD) log-likelihood function under independence in the exponential trawl case.
MoMGPD | Method of moments (MoM) on a one or multiple exceedance timeseries for the latent trawl model using marginal GPD properties and probability of exceedance.
PairwiseOneOne | Computes latent trawl pairwise likelihood with '(x,x)' where 'x' and 'y' positive with exponential trawl function.
PairwiseOneOne1 | Computes first term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne11 | Computes frst part of first term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne12 | Computes second part of first term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne13 | Computes third part of first term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne2 | Computes second term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne21 | Computes second term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne22 | Computes second term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne23 | Computes second term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneOne24 | Computes second term in latent trawl pairwise likelihood with '(x,x)' where 'x' positive and 'y' positive.
PairwiseOneZero | Computes term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive with exponential trawl function.
PairwiseOneZero1 | Computes first part of latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseOneZero2 | Computes second term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseOneZero21 | Computes partial part of second term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseOneZero22 | Computes partial part of second term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseOneZero23 | Computes partial part of second term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseOneZero24 | Computes partial part of second term in latent trawl pairwise likelihood with '(x,0)' where 'x' positive.
PairwiseZeroZero | Computes latent trawl pairwise likelihood with '(x,y) = (0,0)' for Exponential Trawl funciton.
PairwiseZeroZero1 | Computes partial part of latent trawl pairwise likelihood with '(x,y) = (0,0)'.
PairwiseZeroZero2 | Computes second part of latent trawl pairwise likelihood with '(x,y) = (0,0)'.
ParamsListFullPL | Wrapper for FullPL using a list for parameters in the exponential trawl case.
plgpd | Computes the cumulative distribution function of Generalised Pareto Distribution at x, with shape parameter alpha and scale parameter beta.
rlexceed | Simulation of extreme value path using latent trawl process. Transformed marginals have scale parameter '1+kappa'.
rtrawl | Simulation of trawl process path using Slice partition. If using customised trawl functions and primitives (i.e. 'trawl.function = NA'), then, it is required that the user provides 'length(times) + deep_cols' such functions and primitives where the 'deep_cols' first one are used to reconstuct the first trawl value.
SecondOrderDiffVal | Second-order centered differentiation calculation.
SecondOrderMixedDiffVal | Second-order bivariate differentiation calculation.
SinglePairPL | Computes correct latent trawl SINGLE pairwise likelihood depending on the values of '(x1,x2)' with exponential trawl function.
SliceArea | Computes the area of a slice for the Slice Partition method of trawl functions.
TrawlExp | Returns an exponential trawl function with base time t.
TrawlExpPrimitive | Returns a primitive of exponential trawl function with base time t. Such primitive has its zero at 'zero_at'.
TrawlSliceReconstruct | Performs trawl slices reconstuction to get gamma samples using the independent measure scaterring.
TrfFindOffsetScale | Computes predefined transformed scale parameter.
TrfG | Computes g from the marginal transform method (vectorised version). That is from GPD(alpha, beta+kappa) to GPD(offset_shape, offset_scale).
TrfInverseG | Computes inverse of g from the marginal transform method (vectorised version). That is from GPD(offset_shape, offset_scale) to GPD(alpha, beta+kappa).
TrfJacobian | Computes determinant of Jacobian of Marginal Transform (MT) method.
UnivariateFullPL | Computes univariate latent trawl FULL pairwise likelihood depending with exponential trawl function with the option to fix some parameter values.
Zeta | Zeta function from auto-correlation expansion for small lags.