Description Usage Arguments Value Examples
View source: R/tv_upper_bound.R
Given a vector of meeting times, e.g. generated by sample_meeting_times
, a choice of lag L
and an iteration t, returns
mean(pmax(0,ceiling((meetingtimes-L-t)/L))).
1 | tv_upper_bound(meetingtimes, L, t)
|
meetingtimes |
vector of meeting times, such as generated by |
t |
iteration at which to compute the TV upper bound. |
lag |
lag between the chains. |
A non-negative value representing an estimated upper bound between the chain at iteration t and the limiting distribution of the chain.
1 2 3 4 5 6 7 8 | ## Not run:
nrep <- 100
meeting_times <- sapply(1:nrep, function(irep) sample_meeting_times(counts = c(3,2,0,1)))
tmax <- floor(max(meeting_times)*1.2)
ubounds <- sapply(1:tmax, function(t) tv_upper_bound(meeting_times, 1, t))
plot(x = 1:tmax, y = ubounds, type = 'l', xlab = "iteration", ylab = "TV upper bounds")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.