tests/tinytest/test-plot.predict.mex.R

# check reproduce Figure 6 in Heffernan and Tawn
w <- mex(winter,mqu=0.7,penalty="none", which="NO", dqu=.7, margins="gumbel", constrain=FALSE)
noMod <- bootmex(w,trace=101)
noPred <- predict(noMod,trace=101)
par(mfcol=c(2,2))
res <- plot(noPred,main="Fig. 6 Heffernan and Tawn (2004)")
expect_equal(res, NULL, info="plot.predict.mex:correctexecution")

# check for 2-d data
R <- 20
nsim <- 100
wavesurge.mex <- mex(wavesurge,mqu=.7,dqu=0.7,which=1, margins="laplace")
wavesurge.boot <- bootmex(wavesurge.mex,R=R,trace=R+1)
wavesurge.pred <- predict(wavesurge.boot,nsim=nsim,trace=R+1)
par(mfrow=c(1,1))
res <- plot(wavesurge.pred)
expect_equal(res, NULL, info="plot.predict.mex:correctexecution")

Try the texmex package in your browser

Any scripts or data that you put into this service are public.

texmex documentation built on June 22, 2024, 12:26 p.m.