renewal {ltable} | R Documentation |
Function renewal
Description
Estimates MCMC chain convergence based on renewal theory.
Usage
renewal(x, StatesNum=10, Astate=NULL, nForStart = 3000, epsilon1=0.05, epsilon2=0.05)
Arguments
x |
name of the numeric vector of the chain; object of numeric class |
StatesNum |
positive integer that indicates the number of states to classify chain values into, max value is 100 s.t. values of chain classified into 100 ordered states; to choose StatesNum consider the adequate number of unique intervals chain values can be suitably represented by |
Astate |
positive integer from 1 to StateNum that defines state to base calculation on; there may be small differences in results under different base states, see help for details; default is median state value |
nForStart |
positive integer that indicates the maximum distance from beginning of chain to consider in finding Start value, 3000 by default |
epsilon1 |
upper bound of closeness to stationary distribution
|
epsilon2 |
is upper bound of variance of estimator
|
Details
You can ascertaine if the sampled transition probability is close to the determined stationary probability of Markov Chain and how many iterations should be used in order to minimize the error of estimator.
Algorithm is based on renewal theory and implements the concept of the so called "secondary chain". It is supported by strong mathematical reasoning and the obtained solutions are strict, i.e. they are not asymptotic. Hence, this method is not biased by additional error provided by limit theorems.
If the calculated chain length surpasses length of supplied chain whatever chain length is provided it is the indication that chain based estimator deviates from stationary distribution based more than indicated by epsilon2.
The larger the epsilon1 the larger the starting value of the chain. The larger the epsilon2 the lengthier is the chain.
Value
returns two positive integers, starting value of the chain and length of the chain to be used from starting value.
Note
Abstain from repeated supply of lengthier chain. It does not correct the problem of nonstationarity.
Author(s)
Ocheredko Oleksandr Ocheredko@yahoo.com
Examples
require(ltable)
data(tdata, package="ltable")
res1<-MCLogLin(Counts~smoker +contraceptive +tromb +
contraceptive*tromb, data=tdata, draw=5000, burnin=500)
renewal(res1[,1], Astate=5)
renewal(res1[,14], Astate=1)