thresholds_fit: Fit a nonparametric distribution on tabulated data with...

View source: R/thresholds-fit.R

thresholds_fitR Documentation

Fit a nonparametric distribution on tabulated data with thresholds only

Description

Estimate a distribution nonparametrically based on tabulations of a distribution which include:

  • fractiles of the data,

  • the corresponding thresholds.

Usage

thresholds_fit(
  p,
  threshold,
  average = NULL,
  last_bracketshare = NULL,
  last_bracketavg = NULL,
  last_invpareto = NULL,
  bottom_model = NULL,
  lower_bound = 0,
  binf = NULL,
  fast = FALSE
)

Arguments

p

A vector of values in [0, 1].

threshold

The quantiles corresponding to p.

average

The average over the entire distribution. Use NULL for unknown. (Default is NULL.)

last_bracketshare

The share of the last bracket. Use NULL for unknown. (Default is NULL.)

last_bracketavg

The average in the last bracket. Use NULL for unknown. (Default is NULL.)

last_invpareto

The inverted Pareto coefficient at the last threshold. Use NULL for unknown. (Default is NULL.)

bottom_model

Which model to use at the bottom of the distribution? Only relevant if min(p) >= 0. Either "gpd" for the generalized Pareto distribution, "hist" for histogram density, or "dirac". Default is "hist" if min(threshold) > 0, "dirac" if min(threshold) == 0 and "gpd" otherwise.

lower_bound

Lower bound of the distribution. Only relevant if min(p) > 0. Default is 0.

binf

The asymptotic value of the inverted Pareto coefficient. If NULL, it is estimated from the data (recommended, unless the estimated value implies infinite mean). Default is NULL.

fast

Use a faster but less precise method (split-histogram). Default is FALSE.

Value

An object of class gpinter_dist_orig.

Author(s)

Thomas Blanchet, Juliette Fournier, Thomas Piketty


thomasblanchet/gpinter documentation built on Aug. 27, 2024, 3:11 p.m.