bw_select_plugin_multivariate: Plugin bandwidth selection for multivariate data

Description Usage Arguments Details Value Examples

View source: R/bandwidth_selection.R

Description

Returns a plugin bandwidth for multivariate data matrices for the estimation of local Gaussian correlations

Usage

1
bw_select_plugin_multivariate(x = NULL, n = nrow(x), c = 1.75, a = -1/6)

Arguments

x

The data matrix.

n

The number of data points. Can provide only this if we do not want to supply the entire data vector.

c

A constant, se details.

a

A constant, se details.

Details

This function takes in a data matrix with n rows, and returns a the real number c*n^a, which is a quick and dirty way of selecting a bandwidth for locally Gaussian density estimation. The number c is by default set to 1.75, and c = -1/6 is the usual exponent, that stems from the asymptotic convergence rate of the density estimate. This function is usually called from the lg_main wrapper function.

Value

A number, the selected bandwidth.

Examples

1
2
3
  x <- cbind(rnorm(100), rnorm(100))
  bw <- bw_select_plugin_multivariate(x = x)
  bw <- bw_select_plugin_multivariate(n = 100)

hotneim/lg documentation built on May 9, 2020, 7:35 a.m.