diagnose {BMAmevt}R Documentation

Diagnostics for the MCMC output in the PB and NL models.

Description

The method issues several convergence diagnostics, in the particular case when the PB or the NL model is used. The code may be easily modified for other angular models.

Usage

diagnose(obj, ...)

## S3 method for class 'PBNLpostsample'
diagnose(
  obj,
  true.par = NULL,
  from = NULL,
  to = NULL,
  autocor.max = 0.2,
  default.thin = 50,
  xlim.density = c(-4, 4),
  ylim.density = NULL,
  plot = TRUE,
  predictive = FALSE,
  save = TRUE,
  ...
)

Arguments

obj

an object of class postsample: posterior sample, as produced by posteriorMCMC.pb or posteriorMCMC.nl

...

Additional parameters to be passed to the functions posterior.predictive.pb or posterior.predictive.nl.

true.par

The true parameter. If NULL, it is considered as unknown.

from

Integer or NULL. If NULL, the default value is used. Otherwise, should be greater than post.sample$Nbin. Indicates the index where the averaging process should start. Default to post.sample$Nbin +1

to

Integer or NULL. If NULL, the default value is used. Otherwise, must be lower than Nsim+1. Indicates where the averaging process should stop. Default to post.sample$Nsim.

autocor.max

The maximum accepted auto-correlation for two successive parameters in the thinned sample.

default.thin

The default thinning interval if the above condition cannot be satisfied.

xlim.density

The xlim interval for the density plots, on the transformed scale.

ylim.density

the ylim intervals for the density plots.

plot

Logical. Should plots be issued ?

predictive

Logical. Should the predictive density be plotted ?

save

Logical: should the result be saved ? Only used if the posterior sample has been saved itself (i.e. if it contains save=TRUE in its arguments list)

Value

A list made of

predictive

The posterior predictive, or 0 if predictive=FALSE

effective.size

the effective sample size of each component

heidelTest

The first part of the Heidelberger and Welch test (stationarity test). The first row indicates “success” (1) or rejection(0), the second line shows the number of iterations to be discarded, the third line is the p-value of the test statistic.

gewekeTest

The test statistics from the Geweke stationarity test.

gewekeScore

The p-values for the above test statistics

thin

The thinning interval retained

correl.max.thin

The maximum auto-correlation for a lag equal to thin

linked.est.mean

The posterior mean of the transformed parameter (on the real line)

linked.est.sd

The standard deviation of the transformed parameters

est.mean

The posterior mean of the original parameters, as they appears in the expression of the likelihood

sample.sd

the posterior standard deviation of the original parameters


[Package BMAmevt version 1.0.5 Index]