RUnit, run tests to compare behaviour of
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
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
If all is well, the result should indicate that no errors or fails have occurred.
An object of class
RUnitTestData. See the help for
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.
Around 400 checks are performed, some of which run MCMC or bootstrap algorithms. As a result, the function takes a while to run.
Janet E. Heffernan, Harry Southworth
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
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.