exdqlmPlot: Plot exDQLM

View source: R/exdqlmPlot.R

exdqlmPlotR Documentation

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,
  plot = TRUE,
  xlim = NULL,
  ylim = NULL,
  xlab = "time",
  ylab = NULL,
  lwd = 1.5,
  lwd.interval = 0.75,
  lty.interval = 2
)

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.

plot

Logical value indicating whether to draw the plot. If FALSE, the function only returns the plotted summaries. Default is TRUE.

xlim, ylim

Optional limits passed to the base plotting call when plot = TRUE.

xlab, ylab

Optional axis labels passed to the base plotting call when plot = TRUE.

lwd, lwd.interval

Line widths for the dynamic quantile and credible interval bounds, respectively.

lty.interval

Line type for the credible interval bounds.

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.

  • x - Time/index values used for plotting.

Examples


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")
q.summary = exdqlmPlot(M0, plot = FALSE)
options(old)



exdqlm documentation built on June 5, 2026, 1:06 a.m.