Learn R Programming

BSTFA (version 0.1.0)

plot_trace: Plot trace plots

Description

Plot trace plots

Usage

plot_trace(
  out,
  parameter,
  param.range = NULL,
  par.mfrow = c(1, 1),
  density = TRUE
)

Value

A plot containing the trace plot (and density plot when density=TRUE) of the listed parameters.

Arguments

out

Output from BSTFA or BSTFAfull.

parameter

Parameter to plot. See BSTFA and BSTFAfull for parameter names.

param.range

Indices of the named parameter to plot. Default is to plot all relevant parameters.

par.mfrow

Vector of length 2 indicating the number of rows and columns to divide the plotting window.

density

Logical scalar indicating whether to include the density plot of the posterior draws. Default is TRUE.

Author

Adam Simpson

Examples

Run this code
data(out.sm)
attach(out.sm)
plot_trace(out.sm, parameter='beta', param.range=1)

Run the code above in your browser using DataLab