plot.XDNUTS {XDNUTS}R Documentation

Function to view the draws from the posterior distribution.

Description

Function to view the draws from the posterior distribution.

Usage

## S3 method for class 'XDNUTS'
plot(
  x,
  type = 1,
  which = NULL,
  warm_up = FALSE,
  plot.new = FALSE,
  which_chains = NULL,
  colors = NULL,
  gg = TRUE,
  scale = 1,
  ...
)

Arguments

x

an object of class XDNUTS.

type

the type of plot to display.

type = 1

marginal chains, one for each desired dimension.

type = 2

bivariate plot.

type = 3

time series plot of the energy level sets. Good for a quick diagnostic of big models.

type = 4

stickplot of the step-length of each iteration.

type = 5

Histograms of the centered marginal energy in gray and of the first differences of energy in red.

type = 6

Autoregressive function plot of the parameters.

type = 7

Matplot of the empirical acceptance rate and refraction rates.

which

either a numerical vector indicating the index of the parameters of interest or a string

which = 'continuous'

for plotting the first d-k parameters.

which = 'discontinuous'

for plotting the last k parameters.

where both d and k are elements contained in the output of the xdnuts function. If type = 7, it refers to the rates index instead. When which = 'continuous', only the global acceptance rate is displayed. In contrast, when which = 'discontinuous', the refraction rates are shown.

warm_up

a boolean value indicating whether the plot should be made using the warm-up samples.

plot.new

a boolean value indicating whether a new graphical window should be opened. This is advised if the parameters space is big.

which_chains

a numerical vector indicating the index of the chains of interest.

colors

a numerical vector containing the colors for each chain specified in which_chains or for each rate specified in which when type = 7.

gg

A boolean value indicating whether the plot should utilize the grammar of graphics features. Default value is set to TRUE.

scale

A numeric value for scaling the appearance of plots.

...

additional arguments to customize plots. In reality, these do nothing.

Value

A graphical object if gg = TRUE, otherwise nothing is returned.


[Package XDNUTS version 1.5.3 Index]