Learn R Programming

MCMC4Extremes (version 1.1)

gpdp: Posterior Distribution with Parameters of GPD

Description

MCMC runs of posterior distribution of data with parameters of Generalized Pareto Distribution (GPD), with parameters sigma and xi .

Usage

gpdp(data, threshold, int=1000)

Arguments

data
data vector
threshold
a threshold value
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 gpdp that gives a list containing the points of posterior distributions of sigma and xi of the gpd distribution, the data, mean posterior, median posterior and the credibility interval of the parameters.

References

Castellanos, M. A. and Cabras, S. (2007). A default Bayesian procedure for the generalized Pareto distribution, Journal of Statistical Planning and Inference, 137, 473-483.

See Also

plot.gpdp, summary.gpdp

Examples

Run this code
# Obtaining posterior distribution of a vector of simulated points 
x=rgpd(300,xi=0.1,mu=9,beta=2) # in this case beta is the scale parameter sigma

# Obtaning 1000 points of posterior distribution
ajuste=gpdp(x,9, 200)

# Histogram of posterior distribution of the parameters,with 95% credibility intervals
# Danish data for evir package, modelling losses over 10
## Not run data(danish)
## Not run out=gpdp(danish,10,300)

Run the code above in your browser using DataLab