Table_Top_Share: Table of top shares (using three thresholds)

Description Usage Arguments Value References Examples

Description

Table of top shares (using three thresholds)

Usage

1
2
Table_Top_Share(data, weights = rep(1, length(data)), p = 0.01,
  q = c(0.1, 0.05, 0.01), md = FALSE, verbose = FALSE)

Arguments

data

numeric, a vector of observations

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 c(0.1, 0.05, 0.01) for the top 10%, 5% and 1%)

md

logical TRUE to have the table in a markdown format (default is FALSE)

weight

numeric, a vector of weights (default is equal weights)

Value

top shares table (in a Markdown format if md=TRUE)

References

Charpentier & Flachaire (2019) Pareto Models for Top Incomes hal-02145024

Examples

1
2
3
4
5
6
7
8
9
################ Top Share on 200 Simulated Data
set.seed(123)
x <- rpareto1(200, 1, alpha=1.5)
w <- rgamma(200, 10, 10)
Table_Top_Share(data = x, weights = w, q = c(.1,.05))
################ Top Share on Synthetic Data
url_1 <- "https://github.com/freakonometrics/TopIncomes/raw/master/dataframe_yw_1.csv"
df <- read.table(url_1,sep=";",header=TRUE)
Table_Top_Share(data = df$y, weights = df$w)

freakonometrics/TopIncomes documentation built on July 7, 2019, 8:06 a.m.