posteriorMean: Posterior predictive density on the simplex, for...

Description Usage Arguments Details Value See Also

View source: R/posteriorMean.r

Description

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

Usage

1
2
3
  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.

...

Additional parameters to be passed to FUN.

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 ?

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.


lbelzile/BMAmevt documentation built on May 17, 2018, 12:16 p.m.