comparecat {jagshelper}R Documentation

Compare Caterpillar Plots

Description

Interleaved caterpillar plots for all parameters (or a specified subset) from a list of jagsUI output objects or data.frames. The intent of this function is easy comparison of inferences from multiple comparable models.

Here a caterpillar plot is defined as a set of overlayed interval bars (default values are 50 percent and 95 percent), with overlayed median markings, for each of a vector of parameter nodes.

Usage

comparecat(
  x,
  p = NULL,
  ci = c(0.5, 0.95),
  ylim = NULL,
  col = NULL,
  xlab = "",
  ylab = "",
  transform = c("none", "exp", "expit"),
  ...
)

Arguments

x

List of output objects returned from jagsUI or data.frames

p

Optional vector of parameters to subset. All parameters with names matching the beginning of the string supplied will be returned. If the default (NULL) is accepted, all parameters will be plotted.

ci

Credible intervals widths to plot. Defaults to 50% and 95%.

ylim

Y-axis limits for plotting. If the default (NULL) is accepted, limits will be automatically determined.

col

Vector of colors for plotting. If the default (NULL) is accepted, colors will be automatically drawn.

xlab

X-axis label

ylab

Y-axis label

transform

Should the y-axis be (back)transformed? Options are "exp", indicating exponential, or "expit", indicating inverse-logit. Defaults to "none", indicating no transformation. Note: if transform="exp"is used, consider adding additional plotting argument log="y".

...

additional plotting arguments

Value

NULL

Author(s)

Matt Tyers

See Also

caterpillar, comparedens, comparepriors

Examples

## This is the same output object three times, but shows functionality.
comparecat(x=list(asdf_jags_out, asdf_jags_out, asdf_jags_out),
           p=c("a","b","sig"))

## Transformed
comparecat(x=list(asdf_jags_out, asdf_jags_out, asdf_jags_out),
           p=c("sig"), transform="exp")
comparecat(x=list(asdf_jags_out, asdf_jags_out, asdf_jags_out),
           p=c("sig"), transform="exp", log="y")

[Package jagshelper version 0.2.3 Index]