Skip to contents

plot(fit) draws base-R traceplots for monitored scalar parameters in a fitted magComp object. PDF output can contain multiple pages; PNG output is limited to the first page. Titles include the manuscript symbol alongside the descriptive identifier. The horizontal axis uses original MCMC iteration numbers. Pooled sample objects are separated into their original chains for plotting. plot(fit, ...) delegates to plot(samples(fit, ...)); use type = "effects" or type = "combined" to examine those quantities.

Usage

# S3 method for class 'magComp'
plot(x, parameters = NULL, file = NULL,
                      n_col = 2, n_row = 3,
                      width = 8, height = 8, res = 150, ...)

# S3 method for class 'magCompSamples'
plot(x, parameters = NULL, file = NULL,
                             n_col = 2, n_row = 3,
                             width = 8, height = 8, res = 150, ...)

Arguments

x

A fitted magComp object or extracted magCompSamples object.

parameters

Character vector selecting parameter names, indices, or full identifiers. Examples are "variance", "(Intercept)", and "magnitude:stand:variance". Full identifiers join nonempty component, block, term, parameter, and index fields with colons.

file

Optional output file ending in .pdf or .png.

n_col

Number of plot columns per page.

n_row

Number of plot rows per page.

width

Graphics device width in inches.

height

Graphics device height in inches.

res

PNG resolution.

...

For a fitted model, arguments passed to samples(). Unused for a sample object.

Value

Invisibly returns the output file path when file is supplied, otherwise the plotted parameter labels.

See also

summary for the monitored parameters; samples for selection and combined coefficients.