mcmcdiag: mcmcdiag

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

View source: R/mixdiag.R

Description

This function calculates all different diagnostics supported in this library and returns in a list

Usage

1

Arguments

X

Chain (Matrix)

Details

This function calculates four metrics useful for diagnostics of a Markov chain. The chain input could be univariate or multivariate. The univariate summaries are calculated marginally, for each component for a multivariate chains. Effective sample size is calculated for each component. Integrared auto correlation times is also another componentwise measure calculated for all the components. Multivariate Effective sample size is calculated from mcmcse package. Mean squared jump distance is another multivariate summary measure that is returned.

Value

list with following elements:

Author(s)

Abhirup Mallik, malli066@umn.edu

See Also

iact for integrated auto correlation times, msjd for mean squared jump distance of a chain, multiESS for Multivariate effective sample size.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
## Banana Target
lupost.banana <- function(x,B){
 -x[1]^2/200 - 1/2*(x[2]+B*x[1]^2-100*B)^2
}
Banana Gradient
gr.banana <- function(x,B){
 g1 <- -x[1]/100 - 2*B*(x[2]+B*x[1]^2-100*B)
 g2 <- -(x[2]+B*x[1]^2-100*B)
 g <- c(g1,g2)
 return(g)
} 
out.metdir.banana <- metropdir(obj = lupost.banana, dobj = gr.banana,
initial = c(0,1),lchain = 2000,
sd.prop=1.25,
steplen=0.01,s=1.5,B=0.03)
mcmcdiag(out.metdir.banana$batch)

## End(Not run)

dirmcmc documentation built on May 2, 2019, 4:14 a.m.