TopShare: Estimate Top Share

Description Usage Arguments Value Examples

View source: R/code_package.r View source: R/code_package.R

Description

Estimate Top Share

Usage

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

Arguments

data

a vector of observations

p

(default 0.1)

q

(default 0.1)

method

(default "edf", but can be "pareto1" or "gpd")

weight

a vector of weights

edp.direct

logical (default TRUE)

Value

estimation of the share of income/wealth owned by the top p percent of the population, assuming that the top q percent of the distribution is Pareto distributed

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)
TopShare(data_1)

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