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.

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.

Value

Called for its side effects. Returns argument x invisibly.

Details

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

Note

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

See also