gpd_logpost | R Documentation |
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)
pars |
A numeric vector containing the values of the generalized Pareto
parameters |
ss |
A numeric list. Summary statistics to be passed to the generalized
Pareto log-likelihood. Calculated using |
A numeric scalar. The value of the log-likelihood.
Northrop, P. J. and Attalides, N. (2016) Posterior propriety in Bayesian extreme value analyses using reference priors. Statistica Sinica, 26(2), 721-743, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5705/ss.2014.034")}.
gpd_sum_stats
to calculate summary statistics for
use in gpd_loglik
.
rgpd
for simulation from a generalized Pareto
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.