Learn R Programming

shrinkTVP (version 1.0.0)

plot.mcmc.tvp: Graphical summary of posterior distribution for a time-varying parameter

Description

plot.mcmc.tvp plots empirical posterior quantiles for a time-varying parameter.

Usage

# S3 method for mcmc.tvp
plot(x, probs = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)

Arguments

x

a mcmc.tvp object

probs

numeric vector of quantiles to plot for each point in time, with values in [0,1]. The value 0.5 is added to probs if the user does not include it. The default value is c(0.025, 0.25, 0.5, 0.75, 0.975).

...

further arguments to be passed to plot.

Value

Called for its side effects and returns invisibly.

Examples

Run this code
# NOT RUN {
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$beta$beta_x1)
# }

Run the code above in your browser using DataLab