plot_HPD_2D: 2D highest posterior density region

Description Usage Arguments Note

Description

Given a sample from a multivariate posterior distribution, plot the bivariate region of highest marginal posterior density (HPD) for two variables with defined levels.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_HPD_2D(
  ssm,
  path = NULL,
  id = NULL,
  trace = NULL,
  theta,
  prob = c(0.95, 0.75, 0.5, 0.25, 0.1),
  xlab = NULL,
  ylab = NULL,
  plot = TRUE,
  ...
)

Arguments

ssm

a ssm object, returned by new_ssm.

path

character, where to find X_*.csv. If NULL (default), use the path of the last block (e.g. /pmcmc).

id

numeric, indicate which X_*.csv to choose. If NULL (default), use the id of the last block (default to 0 in SSM).

trace

either a data.frame or mcmc object.

prob

probability level

xlab

x axis label

ylab

y axis label

...

other arguments passed to HPDregionplot.

Note

HPD levels are computed using the function HPDregionplot from the package emdbook.


StateSpaceModels/ssminr documentation built on Feb. 7, 2020, 8:20 p.m.