add.chain: Adding chain to custom traceplot

Description Usage Arguments See Also Examples

View source: R/add.chain.R

Description

Function to add a trace line for a single chain of an MCMC to an existing custom traceplot created by my.traceplot.

Usage

1
add.chain(trace.vec, thin = 0, col = "black")

Arguments

trace.vec

Vector containing draws from the MCMC sampler

thin

Amount of thinning applied to the plot. For example, if thin=3, then every third sample point will be plotted. The total number of iterations should be divisible by the thinning amount.

col

Color of trace line. Defaults to black.

See Also

my.traceplot

Examples

1
2
3
4
5
## Draw a traceplot and add chains for a random sample
my.samples = rnorm(10000, 5, 10)
my.samples2 = rnorm(10000, 5, 20)
my.traceplot(my.samples,label="Some title",thin=5,burn=1000,col="blue")
add.chain(my.samples2,thin=5,col="green")

lcomm/ltools documentation built on May 20, 2019, 11:28 p.m.