stats.aMTM: Statistics of a MCMC chain

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/stats.R

Description

Summary statistics for the output chain of an aMTM object.

Usage

1
2
## S3 method for class 'aMTM'
stats(X, cov = NULL)

Arguments

X

A matrix coresponding to the outpout of a MCMC algorithm.

cov

A covariance matrix to compute the MSEJD with. Default is NULL and uses the sample covariance.

Value

A vector containing the following statistics:

msejd

The Mean Sqaured Euclidian Jumping Distance.

msjd

The Mean Sqaured Jumping Distance (using the sample variance in the Mahalanobis distance).

act

The Frobenius norm of the multivariate ACT of the chain.

ess

The multivariate ESS of the chain as described by Vats et al. (2015).

Author(s)

Simon Fontaine, simfont@umich.edu

References

Fontaine, S. and Bedard, M. (2019). "An Adaptive Multiple-Try Metropolis algorithm". To be submitted.

Vats, D., Flegal, J. M., and, Jones, G. L. (2015). "Multivariate Output Analysis for Markov chain Monte Carlo". arXiv preprint arXiv:1512.07713.

See Also

aMTM.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(aMTM)
# Banana log-density with parameter B and a
p <- function(x, p) apply(x,1,function(x) -x[1]^2/(2*p$a^2) - 1/2*(x[2]+p$B*x[1]^2-p$B*p$a^2)^2)
# setup
set.seed(1)
N<-1e5;K<-3
B<-0.04;a<-8
# aMTM sampling with ASWAM update
mcmc <- aMTM(target=p, N=N, K=K, x0=c(0,0), parms=list(a=a,B=B), burnin=0.1)

stats.aMTM(mcmc$X)

stats.aMTM(mcmc$X, diag(1:2))

## End(Not run)

fontaine618/aMTM documentation built on May 23, 2020, 1:31 p.m.