Learn R Programming

GB2 (version 1.0)

PlotsML: Cumulative Distribution Plot and Kernel Density Plot for the Fitted GB2

Description

Function plotsML.gb2 produces two plots. The first is a plot of the empirical cumulative distribution function versus the fitted cumulative distibution function. The second is a plot of the kernel density versus the fitted GB2 density. Function saveplot saves locally the produced plot.

Usage

plotsML.gb2(z, shape1, scale, shape2, shape3, w=1) 
saveplot(name, pathout)

Arguments

z
a numeric vector; in general, a vector of income values.
shape1
positive parameter.
scale
positive parameter.
shape2, shape3
positive parameters of the Beta distribution.
w
a numeric vector of the same length as z; the sampling weights. If not available, the function should be called only with its first argument (the weights are set to 1).
name
a character string specifying the name of the plot.
pathout
a character string specifying the path of the folder or device where the plot will be saved.

Details

The used kernel is "Epanechnikov" (see plot.density).