paradensplot: Probability Density Function Plot for the Parameter...

Description Usage Arguments Details Value Note See Also

View source: R/plotting.R

Description

Displays a plot of the density estimate for the posterior distribution of the parameters mu, phi, sigma (and potentially nu or rho), computed by the density function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
paradensplot(
  x,
  showobs = TRUE,
  showprior = TRUE,
  showxlab = TRUE,
  mar = c(1.9, 1.9, 1.9, 0.5),
  mgp = c(2, 0.6, 0),
  simobj = NULL,
  ...
)

Arguments

x

svdraws object.

showobs

logical value, indicating whether the observations should be displayed along the x-axis. If many draws have been obtained, the default (TRUE) can render the plotting to be quite slow, and you might want to try setting showobs to FALSE.

showprior

logical value, indicating whether the prior distribution should be displayed. The default value is TRUE.

showxlab

logical value, indicating whether the x-axis should be labelled with the number of iterations and the bandwith obtained from density. The default value is TRUE.

mar

numerical vector of length 4, indicating the plot margins. See par for details. The default value is c(1.9, 1.9, 1.9, 0.5), which is slightly smaller than the R-defaults.

mgp

numerical vector of length 3, indicating the axis and label positions. See par for details. The default value is c(2, 0.6, 0), which is slightly smaller than the R-defaults.

simobj

object of class svsim as returned by the SV simulation function svsim. If provided, “true” data generating values will be added to the plots.

...

further arguments are passed on to the invoked plot function.

Details

paradensplot is modeled after densplot in the coda package, with some modifications for parameters that have (half-)bounded support.

Value

Called for its side effects. Returns argument x invisibly.

Note

You can call this function directly, but it is more commonly called by the plot.svdraws method.

See Also

Other plotting: paratraceplot.svdraws(), paratraceplot(), plot.svdraws(), plot.svpredict(), volplot()


stochvol documentation built on July 12, 2021, 5:08 p.m.