plot.shrinkTVP {shrinkTVP} | R Documentation |
Graphical summary of posterior distribution
Description
plot.shrinkTVP
generates plots visualizing the posterior distribution.
Usage
## S3 method for class 'shrinkTVP'
plot(
x,
pars = c("beta"),
nplot = 3,
h_borders = c(0.05, 0.05),
w_borders = c(0.02, 0.02),
...
)
Arguments
x |
a |
pars |
a character vector containing the names of the parameters to be visualized.
The names have to coincide with the names of the list elements of the |
nplot |
positive integer that indicates the number of tvp plots to display on a single page before a new page is generated. The default value is 3. |
h_borders |
single real, positive number smaller than 0.5 or a vector containing two such numbers. Determines
the relative amount of space (the total amount summing up to 1) left blank on the left and right of the plot, in that order.
The default is |
w_borders |
single real, positive number smaller than 0.5 or a vector containing two such numbers. Determines
the relative amount of space (the total amount summing up to 1) left blank at the top and bottom of the plot, in that order.
The default is |
... |
further arguments to be passed to the respective plotting functions. |
Value
Called for its side effects and returns invisibly.
Author(s)
Peter Knaus peter.knaus@wu.ac.at
See Also
Other plotting functions:
plot.mcmc.tvp()
,
plot.shrinkTVP_forc()
Examples
set.seed(123)
sim <- simTVP(theta = c(0.2, 0, 0), beta_mean = c(1.5, -0.3, 0))
data <- sim$data
output <- shrinkTVP(y ~ x1 + x2, data)
plot(output)
## Will produce an error because 'hello' is not a parameter in the model
## Not run:
plot(output, pars = c("beta", "hello"))
## End(Not run)