plotDiagnostic {BayesianTools}R Documentation

Diagnostic Plot

Description

This function plots the DIC, WAIC, mPSRF, PSRF(with upper C.I.) and traces of the parameters in dependence of iterations. DIC, WAIC are plotted separately for the chains and the trace plots also for the internal chains.

Usage

plotDiagnostic(
  out,
  start = 50,
  numSamples = 100,
  window = 0.2,
  plotWAIC = F,
  plotPSRF = T,
  plotDIC = T,
  plotTrace = T,
  graphicParameters = NULL,
  ...
)

Arguments

out

object of class "bayesianOutput"

start

start value for calculating DIC, WAIC, mPSRF and PSRF, default = 50

numSamples

for calculating WAIC, default = 10 because of high computational costs

window

plot range to show, vector of percents or only one value as start value for the window

plotWAIC

whether to calculate WAIC or not, default = T

plotPSRF

calculate and plot mPSRF/PSRF or not, default = T

plotDIC

calculate and plot DICor not, default = T

plotTrace

show trace plots or not, default = T

graphicParameters

graphic parameters as list for plot function

...

parameters to give to getSample

Author(s)

Maximilian Pichler

Examples

## Not run: 
  
  # Create bayesian setup with  
  bayesianSetup <- createBayesianSetup(likelihood = testDensityNormal, 
                                       prior = createUniformPrior(lower = -10,
                                                                  upper = 10))
  # running MCMC
  out = runMCMC(bayesianSetup = bayesianSetup)
  
  # diagnostic plots
  plotDiagnostic(out)

## End(Not run)

[Package BayesianTools version 0.1.8 Index]