Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

kde2d.weighted

Two-Dimentional Kernel Density Estimation (Weighted)


Description

Based of an algorithm found online at https://stat.ethz.ch/pipermail/r-help/2006-June/107405.html.

Usage

kde2d.weighted(x, y, h, n = 25, lims = c(range(x), range(y)), w)

Arguments

x

x coordinate of data

y

y coordinate of data

h

vector of bandwidths for x and y directions. Defaults to normal reference bandwidth (see bandwidth.nrd). A scalar value will be taken to apply to both directions.

n

Number of grid points in each direction. Can be scalar or a length-2 integer vector.

lims

The limits of the rectangle covered by the grid as c(xl, xu, yl, yu).

w

numeric value or vector of same length as x (and y), for weighting, if not provided, a unified weighting of '1' will which will result in the regular density calculation.

Author(s)

Nicholas Hamilton

See Also


ggtern

An Extension to 'ggplot2', for the Creation of Ternary Diagrams

v3.3.0
GPL-2 | file LICENSE
Authors
Nicholas Hamilton [aut, cre]
Initial release
2020-04-9

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.