tracePlot | R Documentation |
2DO (adapt from STooDs): Generate pdf report files summarizing mcmc samples
tracePlot(sim, ylab = "values", keep = NULL, col = "black", psize = 0.5)
sim |
vector or matrix or data frame, MCMC simulations |
ylab |
Character, label of y-axis to be used if sim has no names |
keep |
Integer vector, indices of samples to be kept in cooked MCMC sample |
col |
Color |
psize |
Numeric, point size |
tracePlot
returns a trace plot ggplot (or a list thereof if several columns in sim)
A ggplot (or a list thereof if several columns in sim)
# Create Monte Carlo samples
n=1000
sim=data.frame(p1=rnorm(n),p2=rlnorm(n),p3=runif(n))
# create trace plot for each component
figures=tracePlot(sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.