convergence.plot: Convergence plots

Description Usage Arguments Details Value

View source: R/convergence.plot.R

Description

The function produces a .pdf file containing some convergence plots for the Monte Carlo draws.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
convergence.plot(
  model,
  file = "convergence-output.pdf",
  plotfun = "all",
  pars = NULL,
  point_est = "median",
  prob = 0.5,
  prob_outer = 0.9,
  lags = 10,
  warmup = F,
  width = 7,
  height = 7
)

Arguments

model

an object of class `flexreg`.

file

a character string giving the name of the file (with extension .pdf).

plotfun

an optional character vector of diagnostics plots. The default is to compute all plots, otherwise one can specify a selection of plots among density, trace, intervals, rate, rhat, and acf.

pars

an optional character vector of parameter names. If pars is not specified, all parameters in the regression model are evaluated.

point_est

an optional character to specify the point estimate to be shown between median (the default), mean, or none.

prob

the probability mass to be included in the inner interval (intervals plot) or in the shaded region (for density plot). The default is 0.5.

prob_outer

the probability mass to be included in the outer interval of the intervals plot. The default is 0.9.

lags

the number of lags to be shown in the acf plot. The default is 10.

warmup

a logical scalar indicating whether to include the warmup draws or not (default).

width, height

the width and height of the graphics region of each plot in inches. The default values are 7.

Details

The plots can be further customized using the ggplot2 package.

Value

A .pdf file with one plot per page.


FlexReg documentation built on Jan. 17, 2022, 5:06 p.m.