posteriorMean {BMAmevt}R Documentation

Posterior predictive density on the simplex, for three-dimensional extreme value models.

Description

Computes an approximation of the posterior mean of a parameter functional, based on a posterior parameters sample.

Usage

posteriorMean(
  post.sample,
  FUN = function(par, ...) {
     par
 },
  from = NULL,
  to = NULL,
  thin = 50,
  displ = TRUE,
  ...
)

Arguments

post.sample

A posterior sample as returned by posteriorMCMC

FUN

a parameter functional returning a vector.

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.

thin

Thinning interval.

displ

logical. Should a plot be produced ?

...

Additional parameters to be passed to FUN.

Details

Only a sub-sample is used: one out of thin parameters is used (thinning). Further, only the parameters produced between time from and time to (included) are kept.

Value

A list made of

values

A matrix : each column is the result of FUN applied to a parameter from the posterior sample.

est.mean

The posterior mean

est.sd

The posterior standard deviation

See Also

posteriorMCMC.


[Package BMAmevt version 1.0.5 Index]