curveConcent: Concentration Curve

Description Usage Arguments References See Also Examples

View source: R/InegConc.r

Description

Plots a concentration curve.

Usage

1
curveConcent(x, y, w = NULL, xlab = NA, ylab = NA, add = FALSE, grid = 0, ...)

Arguments

x

Numeric vector with non-negative values.

y

Numeric vector used for the ranking of vector x.

w

Numeric vector of sampling weigths (optional).

xlab

Title for the x-axis.

ylab

Title for the y-axis.

add

If add is TRUE, only the curve is drawn. The device must contain a high-level plot.

grid

If grid >0, a grid is drawn, with spacing equal to 1/grid.

...

Further arguments to be used for drawing the concentration curve (see lines).

References

O'Donnell O., van Doorslaer E., Wagstaff A., Lindelow M. (2008) Analyzing Health Equity Using Household Survey Data. World Bank, 220 p.

See Also

calcSConc

Examples

1
2
3
4
5
6
7
data(hhbudgets)

curveConcent(x=hhbudgets[, "transporte"], y=hhbudgets[,"ingreso"], w=hhbudgets[,"factor"], col="red", xlab="Ranking by income")
curveConcent(x=hhbudgets[, "mantenimiento"], y=hhbudgets[,"ingreso"], w=hhbudgets[,"factor"], col="blue", add=TRUE)
curveConcent(x=hhbudgets[, "publico"], y=hhbudgets[,"ingreso"], w=hhbudgets[,"factor"], col="green", add=TRUE)
title(main="Transport expenditures")
legend("topleft", legend = c("All transport", "Private: Maintenance and repair", "Public transport"), col=c("red", "blue", "green"), lty=rep(1, 3))

Example output



IC2 documentation built on May 1, 2019, 7:49 p.m.