Learn R Programming

exdqlm (version 0.4.0)

exdqlmPlot: Plot exDQLM

Description

The function plots the MAP estimates and 95% credible intervals (CrIs) of the dynamic quantile of an exDQLM.

Usage

exdqlmPlot(m1, add = FALSE, col = "purple", cr.percent = 0.95)

Value

A list of the following is returned:

  • map.quant - MAP estimate of the dynamic quantile.

  • lb.quant - Lower bound of the 95% CrIs of the dynamic quantile.

  • ub.quant - Upper bound of the 95% CrIs of the dynamic quantile.

Arguments

m1

An object of class "exdqlmLDVB", "exdqlmMCMC", or legacy "exdqlmISVB".

add

Logical value indicating whether the dynamic quantile will be added to existing plot. Default is FALSE.

col

Character vector of length 1 giving color of the dynamic quantile to be plotted. Default is purple.

cr.percent

Numeric in (0, 1) indicating the probability mass for the credible intervals (e.g., 0.95). Default 0.95.

Examples

Run this code
# \donttest{
data("scIVTmag", package = "exdqlm")
old = options(exdqlm.max_iter = 15L)
y = scIVTmag[1:60]
model = polytrendMod(1, stats::quantile(y, 0.85), 10)
M0 = exdqlmLDVB(y, p0 = 0.85, model, df = c(0.98), dim.df = c(1),
                   gam.init = -3.5, sig.init = 15,
                   n.samp = 20, tol = 0.2, verbose = FALSE)
exdqlmPlot(M0, col = "blue")
options(old)
# }

Run the code above in your browser using DataLab