Changelog
Source:NEWS.md
revdbayes 1.5.6
Bug fixes and minor improvements
- Implements the patch described in Rcpp Issue #1406 to avoid masking of
Rf_error().
revdbayes 1.5.5
CRAN release: 2024-08-18
Bug fixes and minor improvements
- 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.
revdbayes 1.5.3
CRAN release: 2023-12-01
Bug fixes and minor improvements
The issue described at https://github.com/RcppCore/Rcpp/issues/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 in some Rd files.
revdbayes 1.5.0
CRAN release: 2022-11-12
New features
- When calling
predict.evpost(object, ...), ifobject$model = "bingp"andobject$sim_valshas 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 thelitepackage.
Bug fixes and minor improvements
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.
revdbayes 1.4.9
CRAN release: 2022-05-09
New features
- The function
kgaps_post()can now accept adataargument that- is a matrix of independent subsets of data, such as monthly or seasonal time series from different years,
- contains missing values, that is,
NAs.
- 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().
Bug fixes and minor improvements
The print method
print.evpostavoids printing a long list by printing only the original function call.The default value of
inc_censinkgaps_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
testthatpackage
revdbayes 1.3.8
CRAN release: 2020-08-31
Bug fixes and minor improvements
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.
revdbayes 1.3.7
CRAN release: 2020-06-26
Bug fixes and minor improvements
- Fixed a bug in
dgp()that produced an incorrect value for the log-density (log = TRUE) whenshapeis negative and very close to zero andx = -1/shape.
revdbayes 1.3.6
CRAN release: 2019-12-02
Bug fixes and minor improvements
Use
inherits()to check the class of objects returned fromtry(), rather thanclass().pkgdown documentation at https://paulnorthrop.github.io/revdbayes/
revdbayes 1.3.4
CRAN release: 2019-06-21
New features
- In
set_bin_prior()the user can specify their own prior for the binomial probability, by providing an R function.
Bug fixes and minor improvements
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 defaultmodel = “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 thresholdthreshis 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.)
revdbayes 1.3.3
CRAN release: 2019-03-08
Bug fixes and minor improvements
LF line endings used in inst/include/revdbayes.h and inst/include/revdbayes_RcppExports.h to avoid CRAN NOTE.
The format of the
datasupplied 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 thresholdthreshis 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_mlehas been fixed, so that now solutions with K greater than 1 are discarded. (Many thanks to Leo Belzile.)In
grimshaw_gp_mleusing 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 ifcovis not supplied. (Many thanks to Leo Belzile.)The mathematics in the reference manual has been tidied.
revdbayes 1.3.2
CRAN release: 2018-02-12
Bug fixes and minor improvements
The arguments to
d/p/q/rgevandd/p/q/rgpnow obey the usual conventions for R’s dpqr probability distribution functions.In
pp_check.evpostthe argumentsubtypeis now documented properly.The
confargument tokgaps_mledidn’t work properly:conf = 95was always used. This has been corrected.
revdbayes 1.3.1
CRAN release: 2017-11-01
New features
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”.
Bug fixes and minor improvements
Added the attribute
attr(gom, "npy")(with value 3) to thegomdataset. This is for compatibility with the threshr package.Give an explicit error message if
plot.evpostis called with the logically incompatible argumentsadd_pu = TRUEandpu_only = TRUE.The documentation for
set_bin_priorhas been corrected: only in-built priors are available, i.e. it is not possible for the user to supply their own prior.
revdbayes 1.2.1
CRAN release: 2017-08-21
Bug fixes and minor improvements
In some extreme cases (datasets with very small numbers of threshold excesses) calling
predict.evpostwithtype = "q"andxclose to 1 returns an imprecise value for the requested predictive quantiles. This has been corrected by usingstats::unirootrather thanstats::nlminb.A bug (missing
drop = FALSEin subsetting a matrix) inplot.evpredproduced an error message ifn_yearswas scalar in the prior call topredict.evpost. This bug has been corrected.The placing of … in the function definitions of
rpostandrpost_rcppmeant that it was not possible to supply the argumentrto be passed torust::ruorrust::ru_rcppto change the ratio-of-uniforms tuning parameterr. Furthermore, ifmodel = "os"then trying to do this setsrosin error. This has been corrected.A bug meant that the values returned by
predict(evpost_object, type = "d")being incorrect ifevpost_objectwas returned from a call torpostusingmodel = 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.
revdbayes 1.2.0
CRAN release: 2017-07-14
New features
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_priorhas 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.probandprior.quantfrom the evdbayes package to set these priors.
Bug fixes and minor improvements
The list returned from
set_priornow 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,rgevand the GP functionsdgp,pgp,qgp,rgphave 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
rposthas been corrected: previously it stated that the default foruse_noyisuse_noy = FALSE, when in fact it isuse_noy = TRUE.Bug fixed in
plot.evpost: previously, in thed = 2case, providing the graphical parametercolproduced an error becausecol = 8was hard-coded in a call topoints. Now the extra argumentpoints_parenables the user to provide a list of arguments topoints.All the (R, not C++) prior functions described in the documentation of
set_priorare now exported. This means that they can now be used in the functionposteriorin theevdbayespackage.Unnecessary dependence on package
devtoolsvia Suggests is removed.Bugs fixed in the (R) prior functions
gp_norm,gev_normandgev_loglognorm. The effect of the bug was negligible unless the prior variances are not chosen to be large.In a call to
rpostorrpost_rcppwithmodel = "os"the user may providedatain 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.
revdbayes 1.1.0
CRAN release: 2017-03-14
New features
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 theevpredobject 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.evpostmethod.model = bingpcan 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).
Bug fixes and minor improvements
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
ain the documentation anda_mdiin the code. Now it isaeverywhere.In
set_priorwithprior = "beta"parameter vectorabhas been corrected topq.In the documentation of
rpost()the description of the argumentnoyhas been corrected.Package spatstat removed from the Imports field in description to avoid NOTE in CRAN checks.