validate.texmex: Validate the texmex package

Description Usage Details Value Note Author(s) References See Also Examples

Description

Using package RUnit, run tests to compare behaviour of texmex with expected behaviour

Usage

1

Details

The function uses functionality in the RUnit package to perform many tests to ensure that texmex behaves as expected. These include tests to make sure that texmex can reproduce published results (often parameter estimates and model summaries that appear in Coles (2001) or in Heffernan and Tawn (2004)), logical tests (for example, to ensure that penalizing the likelihood has the expected effect on parameter estimates), tests of the structure of objects, tests of proper vectorization, tests to ensure that simulated posterior means are close to MAP estimates, and tests to ensure that the code gives the same results as independently coded calculations (sometimes using code that appears in the ismev and evd packages, sometimes using code written by a third party, without reference to the texmex version). A further side effect is the production of plots, many of which can be compared with their original published versions to further check that the texmex reproduces expected output.

If all is well, the result should indicate that no errors or fails have occurred.

Value

An object of class RUnitTestData. See the help for RUnit for details.

Plots are also produced on the active plotting device; those plots that reproduce figures in the referenced material are labelled with the Figure numbers of the plot which they emulate.

Note

Around 400 checks are performed, some of which run MCMC or bootstrap algorithms. As a result, the function takes a while to run.

Author(s)

Janet E. Heffernan, Harry Southworth

References

S. Coles, An Introduction to the Statistical Modeling of Extreme Values, Springer, 2001

J. E. Heffernan and J. A. Tawn, A conditional approach for multivariate extreme values (with discussion). Journal of the Royal Statistical Society, Series B, volume 66, 2004

See Also

texmex-package

Examples

1
2
3
4
5
6
7
8
# Uncomment the following lines to run - commented out to make CRAN robots happy
## open device to save plotted output
#library(RUnit)
#pdf("texmexPlots.pdf")
#val <- validate.texmex()
#printHTMLProtocol(val, "texmexReport.html")
## finish writing to device
#dev.off()

texmex documentation built on May 2, 2019, 4:56 p.m.