multiLocal: Estimate a multivariate density function using the LGDE.

Description Usage Arguments Value Examples

View source: R/multivariate_estimation.R

Description

Estimate a multivariate density function using the LGDE.

Usage

1
2
multiLocal(data, bandwidths = NULL, gsize = 15, grid = apply(data, 2,
  function(x) seq(quantile(x, 0.001), quantile(x, 0.999), length.out = gsize)))

Arguments

data

The data matrix, one row per observation.

bandwidths

A matrix of bandwidths. Must be in the same format as is produced by the HLocal-function.

gsize

If grid is not provided, the density will be estimated at gsize points going diagonally through the data.

grid

The grid at which to estimate the density. Must be a matrix with the same number of columns as the data matrix.

Value

A list with 6 elements: $f.est are the density estimates at the grid points, $d is the dimension, $loc.cor are the local correlations, $h is the matrix of bandwidths that was used, $pairs is atwo-column matrix indicating all pairs of variables, $grid is the grid at which the density has been estimated.

Examples

1
2
data <- cbind(rt(100, df = 10), rt(100, df = 10))
multiLocal(data)

hotneim/lgde documentation built on May 17, 2019, 4:52 p.m.