Overlapping estimation

Description

It gives the overlapped estimated area of two or more empirical distributions.

Usage

1
overlap(x, nbins = 1000, plot = FALSE, partial.plot = FALSE)

Arguments

x

list of distributions to be compared; each distribution is an element of the list

nbins

number of equally spaced points at which the overlapping density is evaluated

plot

logical, if TRUE, final plot of estimated densities and overlapped areas is produced

partial.plot

logical, if TRUE, partial paired distributions are plotted

Details

If the list x contains more than two elements (i.e. more than two distributions) it computes all overlapping between all paired distributions. Partial plots refer to these coupled distributions.

If plot=TRUE, all overlapped areas are plotted. It requires lattice.

Value

It returns a list containing the following components:

DD

Data frame with information used for computing overlapping, containing the following variables: x, coordinates of the points where the density is estimated; y, density; j, index of the distribution in the list x; xclass, class of x; xnum, numerical class of x (obtained by cutnumeric); dominance, indicates which distribution has the highest density; w, flag 0-1 for normalizing area; k, label indicating which distributions are compared

OV

Estimates of overlapped areas relative to each couple of distributions.

xpoints

Abscissas of intersection points among the density curves.

Note

Call functions cutnumeric e final.plot.

Author(s)

Massimiliano Pastore

Examples

1
2
3
set.seed(20150605)
x <- list(X1=rnorm(100),X2=rt(50,8),X3=rchisq(80,2))
out <- overlap(x,plot=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.