gpd_logpost: Generalized Pareto posterior log-density

Description Usage Arguments Value References See Also Examples

View source: R/gp_example.R

Description

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 >= -1 in order to produce a posterior density that is proper.

Usage

1
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, http://dx.doi.org/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

1
2
3
4
5
6
7
8
9
## Not run: 
# 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)

## End(Not run)

rust documentation built on Dec. 23, 2017, 5:36 p.m.