bru_convergence_plot: Plot inlabru convergence diagnostics

View source: R/track_plotting.R

bru_convergence_plotR Documentation

Plot inlabru convergence diagnostics

Description

Draws four panels of convergence diagnostics for an iterated INLA method estimation

Usage

bru_convergence_plot(x, from = 1, to = NULL)

Arguments

x

a bru object, typically a result from bru() for a nonlinear predictor model

from, to

integer values for the range of iterations to plot. Default from = 1 (start from the first iteration) and to = NULL (end at the last iteration). Set from = 0 to include the initial linearisation point in the track plot.

Details

Requires the "dplyr", "ggplot2", "magrittr", and "patchwork" packages to be installed.

Value

A ggplot object with four panels of convergence diagnostics:

  • Tracks: Mode and linearisation values for each effect

  • Mode - Lin: Difference between mode and linearisation values for each effect

  • ⁠|Change| / sd⁠: Absolute change in mode and linearisation values divided by the standard deviation for each effect

  • Change & sd: Absolute change in mode and linearisation values and standard deviation for each effect

For multidimensional components, only the overall average, maximum, and minimum values are shown.

See Also

bru()

Examples

## Not run: 
fit <- bru(...)
bru_convergence_plot(fit)

## End(Not run)

fbachl/inlabru documentation built on May 18, 2024, 9:38 p.m.