fit.plot: Plot of the estimated Lorenz curve and the empirical income...

Description Usage Arguments Details Value References Examples

View source: R/fit.plot.R

Description

The function fit.plot plots the parametric Lorenz curve and the observed income shares used for the estimation of the income distributions belonging to the GB2 family.

Usage

1
fit.plot(fit, fit.type = 1, fit.legend = FALSE, l.size = 0.7)

Arguments

fit

A character string "name" naming the object that contains the estimation of the parametric model for which the Lorenz curve is plotted.

fit.type

specifies the method used to estimate the parametric model. By default, fit.type = 1, which represents the Lorenz curve estimated by EWMD. If fit.type = 2, the Lorenz curve belongs to the OMD estimation.

fit.legend

If TRUE, the graph includes a legend indicating the model for which the Lorenz curve is plotted.

l.size

determines the size of the legend.

Details

The function fit.plot represents the parametric Lorenz curves of some models of the GB2 family. Closed expressions of the Lorenz curves of these models are provided by Jorda et al. (2018). The parametric model must be estimated before representing the theoretical Lorenz curve. To do so, create an object containing the result of the following functions: fitgroup.gb2, fitgroup.b2, fitgroup.da, fitgroup.sm, fitgroup.ln or fitgroup.f. The name of this object is used (with quotations marks) as the first argument of fit.plot (see examples below). This function returns a plot with the Lorenz curve of the model estimated by EWMD or OMD. More than one fit can be plotted, even when different sets of data are used. The legend indicates the distribution for which the Lorenz curve is represented.

Value

the function fit.plot returns a graph with the theoretical Lorenz curves of the Generalised Beta of the Second Kind (GB2) family of income distributions and the income shares used for the estimation of these models.

References

Jorda, V., Sarabia, J.M., & Jäntti, M. (2018). Estimation of income inequality from grouped data. arXiv preprint arXiv:1808.09831.

Examples

1
2
3
fit.ln <- fitgroup.ln(y = c(9, 13, 17, 22, 39), gini.e = 0.29)
fit.b2 <- fitgroup.b2(y = c(9, 13, 17, 22, 39), gini.e = 0.29)
fit.plot(c("fit.ln", "fit.b2"), fit.legend = TRUE, l.size = 0.8)

Example output

[1] "Unable to compute the scale parameter and the GMM estimation. Per capita GDP not provided"
[1] "Unable to compute the scale parameter and the GMM estimation. Per capita GDP not provided"

GB2group documentation built on Jan. 26, 2021, 5:06 p.m.

Related to fit.plot in GB2group...