postmode: Posterior Mode from an MCMC Sample

View source: R/BayesFactor.R

postmodeR Documentation

Posterior Mode from an MCMC Sample

Description

Calculate the posterior mode from an MCMC sample for “fevd” objects.

Usage

postmode(x, burn.in = 499, verbose = FALSE, ...)

## S3 method for class 'fevd'
postmode(x, burn.in = 499, verbose = FALSE, ...)

Arguments

x

An object of class “fevd” where component method = “Bayesian”.

burn.in

The furst burn.in samples from the posterior distribution will be removed before calculation.

verbose

logical, should progress information be printed to the screen.

...

Not used.

Details

The log-likelihood and (log) prior is calculated for every sample from the chain, and added together, giving h. The parameters from the sample that yield the maximum value for h are returned. If more than one set of parameters yield a maximum, their average is returned.

Value

A named numeric vector is returned giving the paramter values.

Author(s)

Eric Gilleland

See Also

fevd, findpars

Examples

data(ftcanmax)

fit <- fevd(Prec, ftcanmax, method="Bayesian", iter = 1000, verbose=TRUE)

postmode(fit)


extRemes documentation built on May 29, 2024, 5:27 a.m.