Learn R Programming

ksm (version 1.0)

bandwidth_optim: Bandwidth optimization for symmetric matrix kernels

Description

Given a sample of positive definite matrices, perform numerical maximization of the h-block least square (lscv) or leave-one-out likelihood (lcv) cross-validation criteria using a root search.

Usage

bandwidth_optim(
  x,
  criterion = c("lscv", "lcv"),
  kernel = c("Wishart", "smlnorm", "smnorm"),
  tol = 1e-04,
  h = 1L
)

Value

double, the optimal bandwidth up to tol

Arguments

x

sample of symmetric matrix observations from which to build the kernel density kernel

criterion

optimization criterion, one of lscv for least square cross-validation at lag h or lcv for leave-one-out cross-validation.

kernel

string, one of Wishart, smlnorm (log-Gaussian) or smnorm (Gaussian).

tol

double, tolerance of optimization (root search)

h

lag step for consideration of observations, for the case criterion=lscv