- A patch to fix the issues at https://cran.r-project.org/web/checks/check_results_revdbayes.html. Originally, there were ERRORs on r-release-macos-x86_64 and r-oldrel-macos-x86_64, stemming from the unit tests, but these seem to be false positives because they disappeared.
- The descriptions of the arguments
pars
anda
have been corrected:pars
has length 2, not 3, and the default value ofa
is 1, not Euler's constant. Thank you to Léo Belzile for spotting this. - Fixed 3 \link{} targets with missing package anchors in Rd files
-
The issue described at RcppCore/Rcpp#1287 has been fixed to avoid WARNINGs from CRAN checks on some platforms. Thank you to Dirk Eddelbuettel for providing the fix so quickly!
-
Fixed issues with the incorrect use of \itemize in some Rd files.
-
The unnecessary C++11 specification has been dropped to avoid a CRAN Package Check NOTE.
-
README.md: Used app.codecov.io as base for codecov link.
-
Create the help file for the package correctly, with alias revdbayes-package.
- Removed evdbayes:: completely from tests/testthat/test-inf_priors.R to avoid a WARNING in the r-oldrel-windows-ix86+x86_64 CRAN check in checking for unstated dependencies in 'tests' ...
- When calling
predict.evpost(object, ...)
, ifobject$model = "bingp"
andobject$sim_vals
has a third column named"theta"
containing a posterior sample for the extremal index, then predictive inferences incorporate this posterior sample. This feature is introduced to facilitate thepredict.blite()
function in the upcoming version 1.1.0 of thelite
package.
-
Dependence on the previously suggested package evdbayes has been removed because evdbayes has been archived on CRAN.
-
WARNINGs in the CRAN package check results, like "init.c:120:52: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] extern SEXP _revdbayes_RcppExport_registerCCallable();" have been avoided.
-
The function
kgaps_post()
can now accept adata
argument that- is a matrix of independent subsets of data, such as monthly or seasonal time series from different years,
- contains missing values, that is,
NA
s.
-
A new function
dgaps_post()
produces random samples from a posterior distribution for the extremal index based on what we call the D-gaps model of Holesovsky, J. and Fusek, M. Estimation of the extremal index using censored distributions. Extremes 23, 197–213 (2020). doi: 10.1007/s10687-020-00374-3.dgaps_post()
has the same functionality askgaps_post()
.
-
The print method
print.evpost
avoids printing a long list by printing only the original function call. -
The default value of
inc_cens
inkgaps_post()
is nowinc_cens = TRUE
. -
In the (extremely rare) cases where
grimshaw_gp_mle()
errors or returns an estimate for which the observation information is singular, a fallback function is used, which maximises the log-likelihood usingstats::optim()
-
In the generalised Pareto example in the introductory vignette, it is now noted that for the Gulf of Mexico data a threshold set at the 95% threshold results in only a small number (16) of threshold excesses.
-
In the GP section of the introductory vignette a link is given to the binomial-GP analysis in the Posterior Predictive Extreme Value Inference vignette.
-
In the introductory vignette: corrected references to plots as "on the left" when in fact they were below, and corrected "random example" to "random sample".
-
The microbenchmark results have been reinstated in the "Faster simulation using revdbayes" vignette.
-
Activated 3rd edition of the
testthat
package
- Tests in
test-gp.R
,test-gev.R
andtest-bingp.R
have been modified to avoid errors in the upcoming new release of thetestthat
package.
-
The functions
grimshaw_gp_mle()
,gp_pwm()
andgp_lrs()
are now exported, so that the rust package can access them using :: not :::. -
The hyperlinks to the Grimshaw (1993) paper in the documentation to
grimshaw_gp_mle()
andset_prior()
have been corrected.
- Fixed a bug in
dgp()
that produced an incorrect value for the log-density (log = TRUE
) whenshape
is negative and very close to zero andx = -1/shape
.
-
Use
inherits()
to check the class of objects returned fromtry()
, rather thanclass()
. -
pkgdown documentation at https://paulnorthrop.github.io/revdbayes/
- The d/p/q function for the GEV and GP distributions now handle correctly cases where the input has length 0 and/or is
NA
and inputsInf
and-Inf
.
- In
set_bin_prior()
the user can specify their own prior for the binomial probability, by providing an R function.
-
In
rpost()
andrpost_rcpp()
an error is thrown if the prior and the model are not compatible. Previously a warning was given. -
The penultimate example in the documentation for
set_prior()
has been corrected by addingmodel = "gp". The default
model = "gev"` is not appropriate here because the prior is set up for the GP model. -
(This is an amendment to the third minor improvement in the NEWS for v1.3.3.) In
rpost()
andrpost_rcpp()
an error is thrown if the input thresholdthresh
is lower than the smallest observation indata
. This is only checked whenmodel = "bingp"
ormodel = "pp"
. This not checked whenmodel = "gp"
because the user may legitimately supply only threshold excesses. (Many thanks to Leo Belzile for spotting this.)
-
LF line endings used in inst/include/revdbayes.h and inst/include/revdbayes_RcppExports.h to avoid CRAN NOTE.
-
The format of the
data
supplied torpost()
andrpost_rcpp()
is checked and an error is thrown if it is not appropriate. -
In
rpost()
andrpost_rcpp()
an error is thrown if the input thresholdthresh
is lower than the smallest observation indata
. This is only relevant whenmodel = "gp"
,model = "bingp"
ormodel = "pp"
. -
The summary method for class "evpost" is now set up according to Section 8.1 of the R FAQ at (https://cran.r-project.org/doc/FAQ/R-FAQ.html).
-
A bug in
grimshaw_gp_mle
has been fixed, so that now solutions with K greater than 1 are discarded. (Many thanks to Leo Belzile.) -
In
grimshaw_gp_mle
using the starting value equal to the upper bound can result in early termination of the Newton-Raphson search. A starting value away from the upper bound is now used (lines 282 and 519 of frequentist.R). (Many thanks to Jeremy Rohmer for sending me a dataset that triggered this problem.) -
In
set_prior()
ifprior = "norm"
orprior = "loglognorm"
then an explicit error is thrown ifcov
is not supplied. (Many thanks to Leo Belzile.) -
The mathematics in the reference manual has been tidied.
-
The arguments to
d/p/q/rgev
andd/p/q/rgp
now obey the usual conventions for R's dpqr probability distribution functions. -
In
pp_check.evpost
the argumentsubtype
is now documented properly. -
The
conf
argument tokgaps_mle
didn't work properly:conf = 95
was always used. This has been corrected.
-
Bayesian and maximum likelihood inference for the K-gaps model for inferring the extremal index using threshold inter-exceedances times. [Suveges, M. and Davison, A. C. (2010), Model misspecification in peaks over threshold analysis, The Annals of Applied Statistics, 4(1), 203-221. doi:10.1214/09-AOAS292.]
-
New vignette: "Inference for the extremal index using the K-gaps model".
-
Added the attribute
attr(gom, "npy")
(with value 3) to thegom
dataset. This is for compatibility with the threshr package. -
Give an explicit error message if
plot.evpost
is called with the logically incompatible argumentsadd_pu = TRUE
andpu_only = TRUE
. -
The documentation for
set_bin_prior
has been corrected: only in-built priors are available, i.e. it is not possible for the user to supply their own prior.
-
In some extreme cases (datasets with very small numbers of threshold excesses) calling
predict.evpost
withtype = "q"
andx
close to 1 returns an imprecise value for the requested predictive quantiles. This has been corrected by usingstats::uniroot
rather thanstats::nlminb
. -
A bug (missing
drop = FALSE
in subsetting a matrix) inplot.evpred
produced an error message ifn_years
was scalar in the prior call topredict.evpost
. This bug has been corrected. -
The placing of ... in the function definitions of
rpost
andrpost_rcpp
meant that it was not possible to supply the argumentr
to be passed torust::ru
orrust::ru_rcpp
to change the ratio-of-uniforms tuning parameterr
. Furthermore, ifmodel = "os"
then trying to do this setsros
in error. This has been corrected. -
A bug meant that the values returned by
predict(evpost_object, type = "d")
being incorrect ifevpost_object
was returned from a call torpost
usingmodel = bingp
. The values returned were too small: they differ from the correct values by a factor approximately equal to the proportion of observations that lie above the threshold. This bug has been corrected.
-
Faster computation, owing to the use of packages Rcpp and RcppArmadillo in package rust (https://CRAN.R-project.org/package=rust).
-
New function:
rpost_rcpp
. -
New vignette. "Faster simulation using revdbayes".
-
set_prior
has been extended so that informative priors for GEV parameters can be specified using the argumentsprior = "prob"
orprior = "quant"
. It is no longer necessary to use the functionsprior.prob
andprior.quant
from the evdbayes package to set these priors.
-
The list returned from
set_prior
now contains default values for all the required arguments of a given in-built prior, if these haven't been specified by the user. This simplifies the evaluation of prior densities using C++. -
The GEV functions
dgev
,pgev
,qgev
,rgev
and the GP functionsdgp
,pgp
,qgp
,rgp
have been rewritten to conform with the vectorised style of the standard functions for distributions, e.g. those found at?Normal
. This makes these functions more flexible, but also means that the user take care when calling them with vectors arguments or different lengths. -
The documentation for
rpost
has been corrected: previously it stated that the default foruse_noy
isuse_noy = FALSE
, when in fact it isuse_noy = TRUE
. -
Bug fixed in
plot.evpost
: previously, in thed = 2
case, providing the graphical parametercol
produced an error becausecol = 8
was hard-coded in a call topoints
. Now the extra argumentpoints_par
enables the user to provide a list of arguments topoints
. -
All the (R, not C++) prior functions described in the documentation of
set_prior
are now exported. This means that they can now be used in the functionposterior
in theevdbayes
package. -
Unnecessary dependence on package
devtools
via Suggests is removed. -
Bugs fixed in the (R) prior functions
gp_norm
,gev_norm
andgev_loglognorm
. The effect of the bug was negligible unless the prior variances are not chosen to be large. -
In a call to
rpost
orrpost_rcpp
withmodel = "os"
the user may providedata
in the form of a vector of block maxima. In this instance the output is equivalent to a call to these functions withmodel = "gev"
with the same data.
-
A new vignette (Posterior Predictive Extreme Value Inference using the revdbayes Package) provides an overview of most of the new features. Run browseVignettes("revdbayes") to access.
-
S3
predict()
method for class 'evpost' performs predictive inference about the largest observation observed in N years, returning an object of classevpred
. -
S3
plot()
for theevpred
object returned bypredict.evpost
. -
S3
pp_check()
method for class 'evpost' performs posterior predictive checks using the bayesplot package. -
Interface to the bayesplot package added in the S3
plot.evpost
method. -
model = bingp
can now be supplied torpost()
to add inferences about the probability of threshold exceedance to inferences about threshold excesses based on the Generalised Pareto (GP) model.set_bin_prior()
can be used to set a prior for this probability. -
rprior_quant()
: to simulate from the prior distribution for GEV parameters proposed in Coles and Tawn (1996) [A Bayesian analysis of extreme rainfall data. Appl. Statist., 45, 463-478], based on independent gamma priors for differences between quantiles. -
prior_prob()
: to simulate from the prior distribution for GEV parameters based on Crowder (1992), in which independent beta priors are specified for ratios of probabilities (which is equivalent to a Dirichlet prior on differences between these probabilities).
-
The spurious warning messages relating to checking that the model argument to
rpost()
is consistent with the prior set usingset_prior()
have been corrected. These occurred whenmodel = "pp"
ormodel = "os"
. -
The hyperparameter in the MDI prior was
a
in the documentation anda_mdi
in the code. Now it isa
everywhere. -
In
set_prior
withprior = "beta"
parameter vectorab
has been corrected topq
. -
In the documentation of
rpost()
the description of the argumentnoy
has been corrected. -
Package spatstat removed from the Imports field in description to avoid NOTE in CRAN checks.