Learn R Programming

extRemes (version 2.2)

postmode: 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 fevd postmode(x, burn.in = 499, verbose = FALSE, ...)

Value

A named numeric vector is returned giving the paramter values.

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.

Author

Eric Gilleland

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.

See Also

fevd, findpars

Examples

Run this code
data(ftcanmax)

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

postmode(fit)

Run the code above in your browser using DataLab