Description Usage Arguments Value References Examples
Table of top shares (using three thresholds)
1 2 |
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 |
md |
logical |
weight |
numeric, a vector of weights (default is equal weights) |
top shares table (in a Markdown format if md=TRUE
)
Charpentier & Flachaire (2019) Pareto Models for Top Incomes hal-02145024
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.