get.bw: Bandwidth Selection

Description Usage Arguments Examples

View source: R/get.bw.R

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

1
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

1
2
3
4
5
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 July 1, 2020, 10:27 p.m.

Related to get.bw in mdw...