Learn R Programming

GB2 (version 2.1.1)

Contindic: Sensitivity Analysis of Laeken Indicators on GB2 Parameters

Description

Produces a contour plot of an indicator for a given shape1.

Usage

contindic.gb2(resol, shape1, shape21, shape22, shape31, shape32, fn, title, table=FALSE)

Arguments

resol

numeric; number of grid points horizontally and vertically.

shape1

numeric; positive parameter, first shape parameter of the GB2 distribution.

shape21, shape22, shape31, shape32

numeric; limits on the positive parameters of the Beta distribution.

fn

string; the name of the function to be used for the calculation of the values to be plotted.

title

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 shape1.

Details

An indicator is defined as a function of three parameters. The shape parameter, shape1, is held fixed. The shape parameters shape2 and shape3 vary between shape21 and shape22, and shape31 and shape32, respectively.

See Also

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

Examples

Run this code
# NOT RUN {
par(mfrow=c(2,2))
shape21 <- 0.3
shape31 <- 0.36
shape22 <- 1.5
shape32 <- 1.5
shape11 <- 2.7
shape12 <- 9.2
resol <- 11
rangea <- round(seq(shape11, shape12 ,length.out=4),digits=1)
arpr <- function(shape1, shape2, shape3) 100*arpr.gb2(0.6, shape1, shape2, shape3)
fonc <- "arpr"
for (shape1 in rangea){
contindic.gb2(resol, shape1, shape21, shape22, shape31, shape32, arpr, "At-risk-of-poverty rate", 
table=TRUE)
}
# }

Run the code above in your browser using DataLab