CompoundDensPlot: Comparison of the GB2, compound GB2 and kernel densities

CompoundDensPlotR Documentation

Comparison of the GB2, compound GB2 and kernel densities

Description

Function dplot.cgb2 produces a plot in which the three densities are plotted.

Usage

dplot.cgb2(x,shape1, scale, shape2, shape3, pl0, pl, w=rep(1,length(x)), decomp="r", 
xmax = max(x)*(2/3), choicecol=1:3, kernel="epanechnikov", adjust=1, title=NULL,
ylim=NULL) 

Arguments

x

numeric; can be a vector. The value(s) at which the density is calculated, used for the kernel estimate only. x is positive.

shape1, scale ,shape2, shape3

numeric; positive parameters of the GB2 distribution. On the plot they are denotes as a, codeb, p, q and pl0 respectively.

pl0

numeric; a vector of initial proportions defining the number of components and the weight of each component density in the decomposition. Sums to one.

pl

numeric; a vector of mixture probabilities (output of ml.cgb2). Sums to one. If pl is equal to pl0, we obtain the GB2 distribution.

w

numeric; weights.

decomp

string; specifying if the decomposition of the GB2 is done with respect to the right tail ("r") or the left tail ("l") of the distribution. By default, decomp = "r" - right tail decomposition.

xmax

numeric; maximum x value to be plotted.

choicecol

numeric vector of length 3; defines the color with which the density curves will be plotted.

adjust

numeric; graphical parameter of the generic function density.

title

string; title of the plot. By default is equall to NULL (no title).

ylim

string; scaling of parameters. By default is equall to NULL (automatic scaling).

kernel

string; the kernel used for the kernel density estimate. The default value is "Epanechnikov" (see plot.density).

Details

The legend is placed interactively.

Value

dplot.cgb2 plots a graph with three curves - the GB2 density, the compound GB2 density and the corresponding kernel estimate

Author(s)

Monique Graf and Desislava Nedyalkova


GB2 documentation built on June 22, 2022, 9:07 a.m.

Related to CompoundDensPlot in GB2...