Calculates the generalized Pareto posterior log-density based on a particular prior for the generalized Pareto parameters, a Maximal Data Information (MDI) prior truncated to \(\xi \geq -1\) in order to produce a posterior density that is proper.

gpd_logpost(pars, ss)

Arguments

pars

A numeric vector containing the values of the generalized Pareto parameters \(\sigma\) and \(\xi\).

ss

A numeric list. Summary statistics to be passed to the generalized Pareto log-likelihood. Calculated using gpd_sum_stats

Value

A numeric scalar. The value of the log-likelihood.

References

Northrop, P. J. and Attalides, N. (2016) Posterior propriety in Bayesian extreme value analyses using reference priors. Statistica Sinica, 26(2), 721-743, doi:10.5705/ss.2014.034 .

See also

gpd_sum_stats to calculate summary statistics for use in gpd_loglik.

rgpd for simulation from a generalized Pareto

Examples

# \donttest{
# Sample data from a GP(sigma, xi) distribution
gpd_data <- rgpd(m = 100, xi = 0, sigma = 1)
# Calculate summary statistics for use in the log-likelihood
ss <- gpd_sum_stats(gpd_data)
# Calculate the generalized Pareto log-posterior
gpd_logpost(pars = c(1, 0), ss = ss)
#> [1] -116.2717
# }