iact: Integrated Auto correlation times of a Markov Chain

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

View source: R/mixdiag.R

Description

This function calculates the Integrated Auto Correlation Times of a Markov Chain.

Usage

1
iact(x)

Arguments

x

chain (one dimension)

Details

The Integrated Auto Correlation Times of a Markov Chain X is defined as:

1 + 2 ∑ Γ_i

, where

Γ

indicates the estimated autocorrelation terms of the chain. These are estimated using the sample correlation matrix from the lagged chain. This measure is intended for one dimensional chains or single component of a multivariate chains.

Value

Integrated ACT of the chain.

Author(s)

Abhirup Mallik, malli066@umn.edu

See Also

msjd for mean squared jumping distance, mcmcdiag for summary of diagnostic measures 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)
iact(out.metdir.banana$batch[,1])

## End(Not run)

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