gevp: Posterior Distribution with Parameters of GEV

Description Usage Arguments Value Note See Also Examples

View source: R/gevp.R

Description

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

Usage

1
gevp(data, block, int=1000)

Arguments

X

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.

Note

The non-informative prior distribution of these parameters are Normal(0,1000) for the parameter mu, Gamma(0.001,0.001) for the parameter sigma and Normal(0,100) for parameter xi. During the MCMC runs, screen shows the proportion of iteractions made.

See Also

plot.gevp, summary.gevp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)

Example output

Loading required package: evir

MCMC4Extremes documentation built on May 1, 2019, 8:50 p.m.