find.contours: Find values at which given KDE takes specified values

View source: R/utils.R

find.contoursR Documentation

Find values at which given KDE takes specified values

Description

Find values at which given KDE takes specified values

Usage

find.contours(kde, levels = c(0.6826895, 0.9544997, 0.9973002))

Arguments

kde

a list containing 'x'- and 'y'- arrays, and a 'z'-matrix, as from MASS::kde2d (see below)

levels

the required probability content of the contours (see below)

Value

the values of 'z' that define the minimum-area regions with the specified probability contents Given a list 'kde' containing 'x' and 'y' (the x- and y-coordinates of grid points) and 'z' (values proportional to a probability density at those grid points), we calculate the minimum-area contours which contain the probability contents specified in 'levels'. All the values in 'levels' must be between 0 and 1.


marcpaterno/rcosmosis documentation built on June 5, 2023, 6:43 p.m.