gpd_sum_stats: Generalized Pareto summary statistics

Description Usage Arguments Value See Also Examples

View source: R/gp_example.R

Description

Calculates summary statistics involved in the Generalized Pareto log-likelihood.

Usage

1
gpd_sum_stats(gpd_data)

Arguments

gpd_data

A numeric vector containing positive values.

Value

A list with components

gpd_data

A numeric vector. The input vector with any missings removed.

m

A numeric scalar. The sample size, i.e. the number of non-missing values.

xm

A numeric scalar. The sample maximum

sum_gp

A numeric scalar. The sum of the non-missing sample values.

See Also

rgpd for simulation from a generalized Pareto distribution.

Examples

1
2
3
4
5
6
7
## 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)

## End(Not run)

paulnorthrop/rust documentation built on Jan. 6, 2019, 3:09 a.m.