lpdtrace: Trace and autocorrelation plots of log posterior density or...

View source: R/all_diagnostics.R

lpdtraceR Documentation

Trace and autocorrelation plots of log posterior density or log likelihood from an angmcmc object

Description

Trace and autocorrelation plots of log posterior density or log likelihood from an angmcmc object

Usage

lpdtrace(
  object,
  chain.no,
  use.llik = FALSE,
  plot.autocor = FALSE,
  lag.max = NULL,
  ...
)

Arguments

object

angular MCMC object.

chain.no

vector of chain numbers whose samples are to be be used. in the estimation. By default all chains are used.

use.llik

logical. Should log likelihood be plotted instead of log posterior? Set to FALSE by default.

plot.autocor

logical. Should the autocorrelations be plotted as well?

lag.max

maximum lag for autocorrelation. Passed to acf. Ignored if plot.autocor = FALSE.

...

unused

Examples

# first fit a vmsin mixture model
# illustration only - more iterations needed for convergence
fit.vmsin.20 <- fit_vmsinmix(tim8, ncomp = 3, n.iter =  20,
                             n.chains = 1)
# log posterior density trace
lpdtrace(fit.vmsin.20)
# log likelihood trace
lpdtrace(fit.vmsin.20, use.llik = TRUE)


c7rishi/BAMBI documentation built on March 18, 2023, 6:17 p.m.