Learn R Programming

MCMC4Extremes (version 1.1)

gevp: Posterior Distribution with Parameters of GEV

Description

MCMC runs of posterior distribution of data with parameters of Generalized Extreme Value (GEV) density, with parameters mu, sigma and xi.

Usage

gevp(data, block, int=1000)

Arguments

data
data vector
block
the block size. A numeric value is interpreted as the number of data values in each successive block. All the data is used, so the last block may not contain block observations
int
Number of iteractions selected in MCMC. The program selects 1 in each 10 iteraction, then thin=10. The first thin*int/3 iteractions is used as burn-in. After that, is runned thin*int iteraction, in which 1 of thin is selected for the final MCMC chain, resulting the number of int iteractions.

Value

An object of class gevp that gives a list containing the points of posterior distributions of mu, sigma and xi of the gev distribution, the data, mean posterior, median posterior and the credibility interval of the parameters.

See Also

plot.gevp, summary.gevp

Examples

Run this code
# Obtaining posterior distribution of a vector of simulated points
x=rgev(300,xi=0.1,mu=10,sigma=5)

# Obtaning 600 points of posterior distribution
ajuste=gevp(x,1,200)

# Obtaining 300 points of ponterior distribution of river nidd data
## Not run: data(nidd.annual)
## Not run: out=gevp(nidd.annual,1,300)

# Vector of maxima return for each 15 days for ibovespa data
## Not run: data(ibovespa)
## Not run: postibv=gevp(ibovespa[,4],15,300)
## Not run: plot.ts(postibv$posterior)

Run the code above in your browser using DataLab