| fitPareto {laeken} | R Documentation |
Fit income distribution models with the Pareto distribution
Description
Fit a Pareto distribution to the upper tail of income data. Since a theoretical distribution is used for the upper tail, this is a semiparametric approach.
Usage
fitPareto(
x,
k = NULL,
x0 = NULL,
method = "thetaPDC",
groups = NULL,
w = NULL,
...
)
Arguments
x |
a numeric vector. |
k |
the number of observations in the upper tail to which the Pareto distribution is fitted. |
x0 |
the threshold (scale parameter) above which the Pareto distribution is fitted. |
method |
either a function or a character string specifying the function
to be used to estimate the shape parameter of the Pareto distibution, such as
|
groups |
an optional vector or factor specifying groups of elements of
|
w |
an optional numeric vector giving sample weights. |
... |
addtional arguments to be passed to the specified method. |
Details
The arguments k and x0 of course correspond with each other.
If k is supplied, the threshold x0 is estimated with the n
- k largest value in x, where n is the number of observations.
On the other hand, if the threshold x0 is supplied, k is given
by the number of observations in x larger than x0. Therefore,
either k or x0 needs to be supplied. If both are supplied,
only k is used (mainly for back compatibility).
The function supplied to method should take a numeric vector (the
observations) as its first argument. If k is supplied, it will be
passed on (in this case, the function is required to have an argument called
k). Similarly, if the threshold x0 is supplied, it will be
passed on (in this case, the function is required to have an argument called
x0). As above, only k is passed on if both are supplied. If
the function specified by method can handle sample weights, the
corresponding argument should be called w. Additional arguments are
passed via the ... argument.
Value
A numeric vector with a Pareto distribution fit to the upper tail.
Note
The arguments x0 for the threshold (scale parameter) of the
Pareto distribution and w for sample weights were introduced in
version 0.2. This results in slightly different behavior regarding the
function calls to method compared to prior versions.
Author(s)
Andreas Alfons and Josef Holzer
See Also
thetaPDC, thetaWML, thetaHill,
thetaISE, thetaLS, thetaMoment,
thetaQQ, thetaTM
Examples
data(eusilc)
## gini coefficient without Pareto tail modeling
gini("eqIncome", weights = "rb050", data = eusilc)
## gini coefficient with Pareto tail modeling
# using number of observations in tail
eqIncome <- fitPareto(eusilc$eqIncome, k = 175,
w = eusilc$db090, groups = eusilc$db030)
gini(eqIncome, weights = eusilc$rb050)
# using threshold
eqIncome <- fitPareto(eusilc$eqIncome, x0 = 44150,
w = eusilc$db090, groups = eusilc$db030)
gini(eqIncome, weights = eusilc$rb050)