tabulation_fit: Fit a nonparametric distribution on tabulated data

View source: R/tabulation-fit.R

tabulation_fitR Documentation

Fit a nonparametric distribution on tabulated data

Description

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

  • fractiles of the data,

  • the corresponding brackets,

  • the share of each bracket.

Usage

tabulation_fit(
  p,
  threshold,
  average = NULL,
  bracketshare = NULL,
  topshare = NULL,
  bracketavg = NULL,
  topavg = NULL,
  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.

bracketshare

The corresponding bracket share.

topshare

The corresponding top share.

bracketavg

The corresponding bracket average.

topavg

The corresponding top average.

invpareto

The inverted Pareto coefficient.

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

Asymptotic Pareto coefficient. If NULL or NA, it is directly estimated from the data. 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 Nov. 29, 2022, 4:32 a.m.