genmcmcdiag

Generalized Convergence Diagnostics for Complicated MCMC Algorithms

https://github.com/lukeduttweiler/genmcmcdiag

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Generalized Convergence Diagnostics for Complicated MCMC Algorithms

Basic Info
  • Host: GitHub
  • Owner: LukeDuttweiler
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 646 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# genMCMCDiag


[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/LukeDuttweiler/genMCMCDiag/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LukeDuttweiler/genMCMCDiag/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/genMCMCDiag)](https://CRAN.R-project.org/package=genMCMCDiag)


Determining the convergence of Markov Chain Monte Carlo (MCMC) algorithms run on highly-dimensional or un-ordered spaces is an active area of research. This package implements several distance based algorithms for the creation of diagnostics in these situations. A forthcoming paper describes the methodology used in detail. 

## Installation

``` r
#Install from CRAN
install.packages('genMCMCDiag')

#Install from gitHub
# install.packages("devtools")
devtools::install_github("LukeDuttweiler/genMCMCDiag")
```

## A Simple Example

Consider the results of a multi-chain MCMC algorithm over a univariate space. The `genMCMCDiag` package provides a simple interface to retrieve traceplots, the effective sample size (ESS), and the Gelman-Rubin Potential Scale Reduction Factor (PSRF). 

We demonstrate the usage of `genMCMCDiag` in this simple scenario, using the included simulated MCMC results `uniMCMCResults`. The output of `genDiagnostic` is a traceplot and tables containing the ESS and PSRF results. The method is set to 'standard' here as we don't want to transform the data prior to running the diagnostics, as it is already univariate. 

```{r example1}
#Load package
library(genMCMCDiag)

#View structure of uniMCMCResults
str(uniMCMCResults)

#View Diagnostics
genDiagnostic(uniMCMCResults, proximityMap = 'standard')
```


## A More Complex Example

Consider the results of a more complex multi-chain MCMC algorithm run on the space of Bayesian network (BN) partitions. The space of BN partitions does not have a natural distance based order (unlike the real-line used in the previous example), and so standard traceplots and MCMC diagnostics cannot be used. 

`genMCMCDiag` includes transformation methods to help deal with this issue, based on a user-supplied (or built in) distance function. In this instance we will use the built-in `partitionDistance` and the `ts` transformation method (details to be published in a forthcoming paper), to view a diagnostic traceplot and transformed calculations of the ESS and PSRF diagnostics. 

```{r}
#View Diagnostics from ts method
genDiagnostic(bnMCMCResults, proximityMap = 'ts', distance = partitionDist)
```

The diagnostic results clearly reveal a complete lack of mixing!

Owner

  • Login: LukeDuttweiler
  • Kind: user

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Push event: 4
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Push event: 4

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: 2 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 2 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • LukeDuttweiler (2)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 211 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: genMCMCDiag

Generalized Convergence Diagnostics for Difficult MCMC Algorithms

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 211 Last month
Rankings
Dependent packages count: 27.8%
Dependent repos count: 35.6%
Average: 49.5%
Downloads: 85.2%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • coda >= 0.19.0 imports
  • ggplot2 >= 3.0.0 imports
  • knitr * imports
  • mcmcse > 1.0.0 imports
  • methods * imports