Learn R Programming

fdapace (version 0.6.0)

BwNN: Minimum bandwidth based on kNN criterion.

Description

Input a list of time points Lt, and the number of unique neighbors k. Obtain the minimum bandwidth guaranteeing k unique neighbours.

Usage

BwNN(Lt, k = 3, onlyMean = FALSE, onlyCov = FALSE)

Arguments

Lt

n-by-1 list of vectors

k

number of unique neighbors for cov and mu (default = 3)

onlyMean

Indicator to return only the minimum bandwidth for the mean

onlyCov

Indicator to return only the minimum bandwidth for the covariance

Examples

Run this code
tinyGrid = list(c(1,7), c(2,3),  6,  c(2,4), c(4,5))
BwNN(tinyGrid, k = 2) # c(3,2)

Run the code above in your browser using DataLab