approxk2d: approxk2d

Description Usage Arguments Value Examples

Description

This function uses a gaussian kernel to estimate the joint density distribution at the specified points

Usage

1
approxk2d(x, gridsize = 128, pos = x)

Arguments

x

Matrix of x and y points

gridsize

number or vector indicating the size of the greed where to estimate the density

pos

Matrix of coordinates to evaluate the density

Value

Vector of density estimates

Examples

1
2
3
4
x <- rnorm(500)
y <- x+rnorm(500)
kde2 <- approxk2d(cbind(x, y))
plot(x, y, pch=20, col=hsv(0, kde2/max(kde2), 1))

chrischen1/viper_copy documentation built on May 13, 2019, 6:52 p.m.