Description Usage Arguments Details Value Author(s) See Also Examples
This function calculates the Integrated Auto Correlation Times of a Markov Chain.
1 | iact(x)
|
x |
chain (one dimension) |
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.
Integrated ACT of the chain.
Abhirup Mallik, malli066@umn.edu
msjd
for mean squared jumping distance, mcmcdiag
for summary of diagnostic measures of a chain, multiESS
for Multivariate effective sample size.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.