plot.inequality_curves {ineqJD} | R Documentation |
Plot inequality curves
Description
Method of the generic plot
for objects generated by the function inequalityCurves
.
Usage
## S3 method for class 'inequality_curves'
plot(
x,
pch = 16,
from = 0,
to = 1,
xlim = NULL,
ylim = NULL,
xaxs = "i",
yaxs = "i",
xlab = "p",
ylab = NULL,
main = attributes(x)$index,
sub = paste0(
"grp: ",
paste(attributes(x)$groups, collapse = ", "),
"; src: ",
paste(attributes(x)$sources, collapse = ", ")
),
...
)
Arguments
x |
Object of class |
pch |
A vector of plotting characters or symbols: see |
from , to |
The range over which the function will be plotted. |
xlim |
The x limits (x1, x2) of the plot. The default value, |
ylim |
the y limits of the plot. |
xaxs |
The style of axis interval calculation to be used for the x-axis. See |
yaxs |
The style of axis interval calculation to be used for the y-axis. See |
xlab |
a title for the x axis: see |
ylab |
a title for the y axis: see |
main |
an overall title for the plot: see |
sub |
a sub title for the plot: see |
... |
Arguments to be passed to methods, such as |
Details
This method is a convenience wrapper for plotting inequality curves. Default values of the plot
are modified in order to plot inequality curves in the unitary square. Moreover, the default value of the argument sub
shows in the plot if the curve represents the whole inequality or a contribution.
Value
The same output of the function plot.stepfun
, a list with two components:
t |
abscissa (x) values, including the two outermost ones. |
y |
y values ‘in between’ the |
Author(s)
Alberto Arcagni, Igor Valli
References
Zenga M. M.(2007). Inequality Curve and Inequality Index based on the Ratios between llower and upper Means . Statistica and Applicazioni, V (1), 3-27.
Zenga M. (2015) Joint decomposition by subpopulations and sources of the point and synthetic Zenga(2007) Index I(Y). Statistica and Applicazioni, XIII (2), pp.163-195.
Zenga M., Valli I. (2017). Joint decomposition by Subpopulations and Sources of the Point and Synthetic Bonferroni Inequality Measures. Statistics and Applications, XV (2), pp. 83-120.
Zenga M., Valli I. (2018). Joint decomposition by Subpopulations and Sources of the Point and Synthetic Gini Indexes. Statistics and Applications, XVI (1).
See Also
plot
, graphical parameters
, par
, plot.stepfun
, inequalityCurves
Examples
G <- c(1, 2, 3, 1, 2, 3, 1, 1, 2, 3, 3, 3) # vector denoting group membership
X1 <- c(0, 0, 0, 500, 700, 300, 750, 1000, 500, 500, 500, 1000) # vector of the first source
X2 <- c(0, 0, 0, 500, 300, 700, 750, 500, 700, 700, 1000,600) # vector of the second source
data <- data.frame(G, X1, X2) # no sample weights are considered
x <- dataProcessing( # data preparation
units = data[, c('X1', 'X2')],
groups = data[, 'G'],
)
decomposition <- zenga(x)
ic <- inequalityCurves(decomposition)
contrib1 <- inequalityCurves(decomposition, l = 1)
contrib12 <- inequalityCurves(decomposition, l = 1:2)
plot(ic)
plot(contrib1, add = TRUE)
plot(contrib12, add = TRUE)
text(0.1, 1/6+0:2/3, labels = c("G1", "G2", "G3"))