Learn R Programming

rKIN (version 1.0.4)

bw_hlscv: Least-squares cross-validation bandwidth matrix selector for multivariate data.

Description

A simple wrapper for the ks::Hlscv function.

Usage

bw_hlscv(x)

Value

A numeric vector of estimated x and y bandwidths. Must subset your data if you wish to obtain group specific bandwidths.

Arguments

x

2d matrix of data values.

Author

Shannon E. Albeke, Wyoming Geographic Information Science Center, University of Wyoming

Examples

Run this code
data("rodents")
# Subset the data for a single species
spec1<- rodents[rodents$Species == "Species1", ]
# Calculate the bandwidth
bw_hlscv(as.matrix(spec1[, c("Ave_C", "Ave_N")]))

Run the code above in your browser using DataLab