Learn R Programming

GB2 (version 1.0)

Contindic: Sensitivity Analysis of Laeken Indicators on GB2 Parameters

Description

Produces a contour plot of an indicator.

Usage

contindic.gb2(resol, a, p1, p2, q1, q2, fn, tit, table=FALSE)

Arguments

resol
a scalar; number of grid points horizontally and vertically.
a
scalar; positive parameter
p1, p2, q1, q2
scalars; p1 and q1 (p2 and q2) are, respectively, the min and max values of the positive parameters of the Beta distribution p and q.
fn
character; the name of the function to be used for the calculation of the values to be plotted.
tit
string; title of the plot.
table
boolean; if TRUE, a table containing the values of the function fn at the different grid points is printed.

Value

  • A contour plot of a given indicator for a fixed value of the shape parameter a.

Details

An indicator is defined as a function of three parameters. The shape parameter, a, is held fixed.

See Also

contour (package graphics) for more details on contour plots.

Examples

Run this code
par(mfrow=c(2,2))
p1 <- 0.3
q1 <- 0.36
p2 <- 1.5
q2 <- 1.5
a1 <- 2.7
a2 <- 9.2
resol <- 11
rangea <- round(seq(a1,a2,length.out=4),digits=1)
arpr <- function(a,p,q) 100*arpr.gb2(0.6,a,p,q)
fonc <- "arpr"
for (a in rangea){
contindic.gb2(resol,a,p1,p2,q1,q2,arpr,"At-risk-of-poverty rate",table=TRUE)
}

Run the code above in your browser using DataLab