powered by
2DO (adapt from STooDs): Generate pdf report files summarizing mcmc samples
tracePlot(sim, ylab = "values", keep = NULL, col = "black", psize = 0.5)
A ggplot (or a list thereof if several columns in sim)
vector or matrix or data frame, MCMC simulations
Character, label of y-axis to be used if sim has no names
Integer vector, indices of samples to be kept in cooked MCMC sample
Color
Numeric, point size
tracePlot
returns a trace plot 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)
Run the code above in your browser using DataLab