hellinger.diag: Hellinger Distance Diagnostics for MCMC

Description Usage Details Value References Examples

View source: R/hellinger.diag.R

Description

This computes the Hellinger distance for mcmc or mcmc.list objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
hellinger.diag(x)

## S3 method for class 'list'
hellinger.diag(x)

## S3 method for class 'mcmc.list'
hellinger.diag(x)

## S3 method for class 'matrix'
hellinger.diag(x, bins, binwidth)

## S3 method for class 'mcmc'
hellinger.diag(x, bins, binwidth)

Details

@param x A mcmc or mcmc.list object. For mcmc object contains one single MCMC chain, the within-chain distance is computed. For mcmc.list object containing multiple MCMC chains, the between distribution distance(s) is computed. @param bins Number of bins for testing within-chain distance. Defaults to 10. @param binwidth Alternative specification for bins. The size of bin for each batch of the chain(s) for computing the distance between batches.

Value

A matrix of the estimates.

References

Boone, Edward L., Jason RW Merrick, and Matthew J. Krachey (2014). "A Hellinger distance approach to MCMC diagnostics." Journal of Statistical Computation and Simulation, 84 (4), 833-849, doi:10.1080/00949655.2012.729588.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

data(tobit.list)
summary(tobit.list[1])

# FOR mcmc.list OBJECT
hellinger.diag.mcmc.list(tobit.list)

# FOR mcmc OBJECT
hellinger.diag.mcmc(tobit.list[[1]])


## End(Not run)

superdiag documentation built on Dec. 5, 2020, 5:07 p.m.