Skip to contents

Usage

dist_genpareto(u = NULL, sigmau = NULL, xi = NULL)

dist_genpareto1(u = NULL, sigmau = NULL, xi = NULL)

Arguments

u

Scalar location parameter, or NULL as a placeholder.

sigmau

Scalar scale parameter, or NULL as a placeholder.

xi

Scalar shape parameter, or NULL as a placeholder.

Value

A GeneralizedParetoDistribution object.

Details

All parameters can be overridden with with_params = list(u = ..., sigmau = ..., xi = ...).

dist_genpareto1 is equivalent to dist_genpareto but enforces bound constraints on xi to [0, 1]. This ensures unboundedness and finite expected value unless xi == 1.0.

Examples

d_genpareto <- dist_genpareto(u = 0, sigmau = 1, xi = 1)
x <- d_genpareto$sample(100)
d_emp <- dist_empirical(x)

d_genpareto$export_functions("gpd") # so fitdistrplus finds it
#> Exported `dgpd()`.
#> Exported `rgpd()`.
#> Exported `pgpd()`.
#> Exported `qgpd()`.

plot_distributions(
  empirical = d_emp,
  theoretical = d_genpareto,
  estimated = d_genpareto,
  with_params = list(
    estimated = fit(dist_genpareto(), x)$params
  ),
  .x = seq(0, 5, length.out = 100)
)