shares_fit: Fit a nonparametric distribution on tabulated data without...

View source: R/shares-fit.R

shares_fitR Documentation

Fit a nonparametric distribution on tabulated data without thresholds

Description

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

  • fractiles of the data,

  • the share of each bracket.

Usage

shares_fit(
  p,
  average = NULL,
  bracketshare = NULL,
  topshare = NULL,
  bracketavg = NULL,
  topavg = NULL,
  first_threshold = NULL,
  last_invpareto = NULL,
  bottom_model = NULL,
  top_model = NULL,
  lower_bound = 0,
  binf = NULL,
  fast = FALSE
)

Arguments

p

A vector of values in [0, 1].

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.

first_threshold

The value of the first threshold. If NULL, it is estimated from the data. 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, or "hist" for histogram density. Default is "hist" if min(threshold) > 0, and "gpd" otherwise.

top_model

Which model to use at the top of the distribution? Either "gpd" for generalized Pareto distribution, or "pareto" for standard Pareto distribution. Default is "gpd".

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 Aug. 27, 2024, 3:11 p.m.