Top_Share: Top_Share

Description Usage Arguments Value Examples

View source: R/hello.R View source: R/code_package_v4_juin_2019.R View source: R/code_package_v3_juin_2019.R

Description

This function estimates Top Share

Usage

1
Top_Share(data, p = 0.01, q = 0.1, method = "edf", epd.direct = TRUE)

Arguments

data

a vector of observations, from tidy_income

p

numeric, the probability level (default 0.01 for the top 1%)

q

numeric (possibly a vector), the probability level to model a Pareto distribution (default 0.1)

method

is the distribution considered (default "edf" for the empirical distribution function, but can be "pareto1", "gpd" or "epd")

edp.direct

logical (default TRUE) for the method use for EPD fit

Value

estimation of the share of income/wealth owned by the top 100p% of the population, assuming that the top 100q% of the distribution is Pareto distributed. The list contains elements for each value of q if it is a vector, with index the share, alpha the inverse of the tail index, coef, share.index the value of p, share.pareto the value of the threshold as a percentage (.1 for the 90% quantile) and threshold for the numerical value.

Examples

1
2
3
4
url_1 <- "https://github.com/freakonometrics/TopIncome/raw/master/data_csv/dataframe_yw_1.csv"
df <- read.table(url_1,sep=";",header=TRUE)
data_1  <-  tidy_income(income = df$y, weights = df$w)
Top_Share(data_1)

freakonometrics/TopIncome documentation built on Oct. 16, 2021, 5:58 p.m.