{"id":23508600,"url":"https://github.com/paulnorthrop/revdbayes","last_synced_at":"2025-04-16T14:39:55.830Z","repository":{"id":49292651,"uuid":"74608041","full_name":"paulnorthrop/revdbayes","owner":"paulnorthrop","description":"Ratio-of-Uniforms Sampling for Bayesian Extreme Value Analysis","archived":false,"fork":false,"pushed_at":"2024-08-21T16:05:00.000Z","size":268108,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T12:06:22.276Z","etag":null,"topics":["analysis","bayesian","extreme","extreme-value-statistics","extremes","generalized-pareto-distribution","gev","inference","nhpp","point-process","posterior","predictive","r","rcpp","value"],"latest_commit_sha":null,"homepage":"https://paulnorthrop.github.io/revdbayes/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulnorthrop.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-23T19:35:08.000Z","updated_at":"2024-09-11T19:05:47.000Z","dependencies_parsed_at":"2024-08-18T09:23:00.163Z","dependency_job_id":"a7913eac-353f-45b8-8d69-71488bfe4153","html_url":"https://github.com/paulnorthrop/revdbayes","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Frevdbayes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Frevdbayes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Frevdbayes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Frevdbayes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulnorthrop","download_url":"https://codeload.github.com/paulnorthrop/revdbayes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249250965,"owners_count":21237965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","bayesian","extreme","extreme-value-statistics","extremes","generalized-pareto-distribution","gev","inference","nhpp","point-process","posterior","predictive","r","rcpp","value"],"created_at":"2024-12-25T11:23:21.263Z","updated_at":"2025-04-16T14:39:55.811Z","avatar_url":"https://github.com/paulnorthrop.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# revdbayes \u003cimg src=\"tools/revdbayes_logo.png\" height = \"150\" align=\"right\" /\u003e\n\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/paulnorthrop/revdbayes?branch=master\u0026svg=true)](https://ci.appveyor.com/project/paulnorthrop/revdbayes)\n[![R-CMD-check](https://github.com/paulnorthrop/revdbayes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/paulnorthrop/revdbayes/actions/workflows/R-CMD-check.yaml)\n[![Coverage Status](https://codecov.io/github/paulnorthrop/revdbayes/coverage.svg?branch=master)](https://app.codecov.io/github/paulnorthrop/revdbayes?branch=master)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/revdbayes)](https://cran.r-project.org/package=revdbayes)\n[![Downloads (monthly)](https://cranlogs.r-pkg.org/badges/revdbayes?color=brightgreen)](https://cran.r-project.org/package=revdbayes)\n[![Downloads (total)](https://cranlogs.r-pkg.org/badges/grand-total/revdbayes?color=brightgreen)](https://cran.r-project.org/package=revdbayes)\n\n### Ratio-of-uniforms Sampling for Bayesian Extreme Value Analysis\n\n### What does revdbayes do?\n\nThe `revdbayes` package uses the ratio-of-uniforms method to produce random samples from the posterior distributions that occur in some relatively simple Bayesian extreme value analyses.  The functionality of revdbayes is similar to the [`evdbayes` package](https://cran.r-project.org/package=evdbayes), which uses Markov Chain Monte Carlo (MCMC) methods for posterior simulation.  Advantages of the ratio-of-uniforms method over MCMC in this context are that the user is not required to set tuning parameters nor to monitor convergence and a random posterior sample is produced. Use of the [Rcpp package](https://cran.r-project.org/package=evdbayes) enables `revdbayes` to be faster than `evdbayes`.  Also provided are functions for making inferences about the extremal index, using the K-gaps model of [Suveges and Davison (2010)](https://doi.org/10.1214/09-AOAS292) and the D-gaps model of \n[Holesovsky and Fusek (2020)](https://doi.org/10.1007/s10687-020-00374-3).\n\n### A simple example\n\nThe two main functions in `revdbayes` are `set_prior` and `rpost`.\n`set_prior` sets a prior for extreme value parameters.\n`rpost` samples from the posterior produced by updating this prior\nusing the likelihood of observed data under an extreme value model.\nThe following code sets a prior for Generalised Extreme Value (GEV)\nparameters based on a multivariate normal distribution and then\nsimulates a random sample of size 1000 from the posterior distribution \nbased on a dataset of annual maximum sea levels.\n\n```{r, eval = FALSE}\ndata(portpirie)\nmat \u003c- diag(c(10000, 10000, 100))\npn \u003c- set_prior(prior = \"norm\", model = \"gev\", mean = c(0,0,0), cov = mat)\ngevp  \u003c- rpost(n = 1000, model = \"gev\", prior = pn, data = portpirie)\nplot(gevp)\n```\n\nFrom version 1.2.0 onwards the faster function `rpost_rcpp` can be used.  \nSee the vignette \"Faster simulation using revdbayes and Rcpp\" for details.\nThe functions `rpost` and `post_rcpp` have the same syntax.  For example:\n\n```{r, eval = FALSE}\ngevp_rcpp  \u003c- rpost_rcpp(n = 1000, model = \"gev\", prior = pn, data = portpirie)\n```\n\n### Installation\n\nTo get the current released version from CRAN:\n\n```{r installation, eval = FALSE}\ninstall.packages(\"revdbayes\")\n```\n\n### Vignettes\n\nSee `vignette(\"revdbayes-a-vignette\", package = \"revdbayes\")` for an overview of the package and `vignette(\"revdbayes-b-using-rcpp-vignette\", package = \"revdbayes\")` for an illustration of the improvements in efficiency produced using the Rcpp package.  See `vignette(\"revdbayes-c-predictive-vignette\", package = \"revdbayes\")` for an outline of how to use revdbayes to perform posterior predictive extreme value inference.  Inference for the extremal index using threshold inter-exceedance times is described in `vignette(\"revdbayes-d-kgaps-vignette\", package = \"revdbayes\")`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulnorthrop%2Frevdbayes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulnorthrop%2Frevdbayes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulnorthrop%2Frevdbayes/lists"}