Description Usage Arguments Details Value See Also Examples
silvbw
calculates quasi-optimal bandwidth
for kernel density estimate by weighted sample
based on the mixture with varying concentrations approach
1 | silvbw(xs, m, delta = 1.7188)
|
xs |
a |
m |
a number of component for which the density is estimated. |
delta |
the canonical bandwidth of the kernel used in the estimate. |
The default value of delta
=1.7188 corresponds to
the Epanechnikov kernel.
a numeric value of the Silverman's optimal bandwidth.
Maiboroda R., Sugakova O. "Statistics of mixtures with varying concentrations with application to DNA microarray data analysis". Nonparametric statistics (2012) v.24:1, p. 201 - 215.
1 2 3 4 5 6 7 8 9 | #' @examples
set.seed(3)
p <- genunifp(1000,2) # create mixing probabilities
a <- lsweight(p) # calculate minimax weights
# create a weighted sample:
xs <- wtsamp(genormixt(p,c(0,1),c(1,1)),indiv=a)
f<-densgen(xs,1) # create the estimator
h<-silvbw(xs,1) # calculates the bandwidth by the Silverman's rule
curve(f(x,h),-3,3) # plot the graph (estimates N(0,1) density)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.