clean_input_shares: Clean (and check) the inputs for 'shares_fit'

View source: R/clean-input.R

clean_input_sharesR Documentation

Clean (and check) the inputs for shares_fit

Description

Check the validity and consistency of the input arguments of shares_fit.

Usage

clean_input_shares(
  p,
  average,
  bracketshare = NULL,
  topshare = NULL,
  bracketavg = NULL,
  topavg = NULL,
  first_threshold = NULL,
  bottom_model = NULL,
  lower_bound = 0,
  top_model = NULL
)

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.

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.

lower_bound

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

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".

Author(s)

Thomas Blanchet, Juliette Fournier, Thomas Piketty


thomasblanchet/gpinter documentation built on Nov. 29, 2022, 4:32 a.m.