get.bw: Bandwidth Selection

View source: R/get.bw.R

get.bwR Documentation

Bandwidth Selection

Description

get.bw applies a specified bandwidth selection method to the dataset subject-wisely and return the median of the n selected bandwidths as the choice of bandwidth for entropy.weight.

Usage

get.bw(x, bw = c("nrd", "ucv", "bcv", "SJ"), nb)

Arguments

x

n by p maxtrix containing observations of p biomarkers of n subjects.

bw

bandwidth selectors of nrd, ucv, bcv, and SJ corresponding to R functions bw.nrd, bw.ucv, bw.bcv, and bw.SJ.

nb

number of bins to use, 'na' if bw='nrd'

Examples

library(MASS)
# a ten biomarkers dataset generated from independent normal(0,1)
x = mvrnorm(n = 100, mu=rep(0,10), Sigma=diag(10), tol = 1e-6, empirical = FALSE, EISPACK = FALSE)
get.bw(x,bw='ucv',nb=100)
get.bw(x,bw='nrd',nb='na')

mdw documentation built on Sept. 11, 2024, 7:07 p.m.

Related to get.bw in mdw...