tracePlot: MCMC reporting

View source: R/RUI.R

tracePlotR Documentation

MCMC reporting

Description

2DO (adapt from STooDs): Generate pdf report files summarizing mcmc samples

Usage

tracePlot(sim, ylab = "values", keep = NULL, col = "black", psize = 0.5)

Arguments

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

Details

tracePlot

returns a trace plot ggplot (or a list thereof if several columns in sim)

Value

A ggplot (or a list thereof if several columns in sim)

Examples

# 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)

BaM-tools/RBaM documentation built on April 11, 2025, 10:01 p.m.