plot-est.hiddenDiffusion-method: Plot method for the Bayesian estimation results

Description Usage Arguments Examples

Description

Plot method for the estimation results of the hidden diffusion model.

Usage

1
2
3
4
## S4 method for signature 'est.hiddenDiffusion'
plot(x, par.options, style = c("chains",
  "acf", "density"), par2plot, reduced = FALSE, thinning, burnIn,
  priorMeans = TRUE, col.priorMean = 2, lty.priorMean = 1, ...)

Arguments

x

est.hiddenDiffusion class, created with method estimate,hiddenDiffusion-method

par.options

list of options for function par()

style

one out of "chains", "acf", "density"

par2plot

logical vector, which parameters to be plotted, order: (φ, γ^2, σ^2, Y)

reduced

logical (1), if TRUE, the chains are thinned and burn-in phase is dropped

thinning

thinning rate, if missing, the proposed one by the estimation procedure is taken

burnIn

burn-in phase, if missing, the proposed one by the estimation procedure is taken

priorMeans

logical(1), if TRUE (default), prior means are marked with a line

col.priorMean

color of the prior mean line, default 2

lty.priorMean

linetype of the prior mean line, default 1

...

optional plot parameters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
model <- set.to.class("hiddenDiffusion", b.fun = function(phi, t, y) phi[1]-phi[2]*y,
    parameter = list(phi = c(10, 1), gamma2 = 1, sigma2 = 0.1),
    y0 = function(phi, t) 0.5)
data <- simulate(model, t = seq(0, 1, by = 0.01), plot.series = TRUE)
est <- estimate(model, t = seq(0, 1, by = 0.01), data$Y, 100)  # nMCMC small for example
plot(est)
plot(est, par2plot = c(rep(FALSE, 3), TRUE, FALSE), ylim = c(0.001, 0.1), par.options = list())
plot(est, burnIn = 10, thinning = 2, reduced = TRUE)
plot(est, par.options = list(mar = c(5, 4.5, 4, 2) + 0.1, mfrow = c(3,1)), xlab = "iteration")
plot(est, style = "acf", main = "", par2plot = c(TRUE, TRUE, FALSE, FALSE))
plot(est, style = "density", lwd = 2, priorMean = FALSE)
plot(est, style = "density", col.priorMean = 1, lty.priorMean = 2, main = "posterior")
plot(est, style = "acf", par.options = list(), main = "", par2plot = c(FALSE, FALSE, TRUE, TRUE))

BaPreStoPro documentation built on May 2, 2019, 3:34 p.m.