shrinkOut | R Documentation |
Shrink observations that are flagged as outliers in a Pareto model for the upper tail of the distribution to the theoretical quantile used for outlier detection.
shrinkOut(x, ...)
## S3 method for class 'paretoTail'
shrinkOut(x, ...)
x |
an object of class |
... |
additional arguments to be passed down (currently ignored as there are no additional arguments in the only method implemented). |
A numeric vector consisting mostly of the original values, but with outlying observations in the upper tail shrunken to the corresponding theoretical quantile of the fitted Pareto distribution.
Andreas Alfons
A. Alfons and M. Templ (2013) Estimation of Social Exclusion Indicators from Complex Surveys: The R Package laeken. Journal of Statistical Software, 54(15), 1–25. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v054.i15")}
paretoTail
, reweightOut
,
replaceOut
, replaceTail
data(eusilc)
## gini coefficient without Pareto tail modeling
gini("eqIncome", weights = "rb050", data = eusilc)
## gini coefficient with Pareto tail modeling
# estimate threshold
ts <- paretoScale(eusilc$eqIncome, w = eusilc$db090,
groups = eusilc$db030)
# estimate shape parameter
fit <- paretoTail(eusilc$eqIncome, k = ts$k,
w = eusilc$db090, groups = eusilc$db030)
# shrink outliers
eqIncome <- shrinkOut(fit)
gini(eqIncome, weights = eusilc$rb050)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.