Description Usage Arguments Details Value Examples
This is the description of the function vkde
.
1 | vkde(tdat, edat, bwtype, h, p = 1, verbose = F)
|
tdat |
a vector containing the training dataset. |
edat |
a vector containing the evaluation data points. |
bwtype |
a string corresponding to the method for calculating bandwidths.
Either |
h |
the bandwidth(s) of the kernels. It should be a scalar when
|
These are the details of the function.
The density at locations edat
based on the training dataset
tdat
following the method specified by bwtype
. The bandwidths
h
can be calculated from other functions in this package.
1 2 3 4 5 6 7 8 9 10 | evalVect <- seq(from=-5,to=5,by=0.1)
trainingVect <- runif(5,min = -1,max = 2)
kernelVect <- vkde(tdat=trainingVect,edat=evalVect,'fixed',1)
plot(evalVect,kernelVect$kde,
type='l',
xlab = 'x',ylab='kernel density estimate')
axis(1,trainingVect,labels = NA,lwd.ticks = 2,col.ticks = 'red',tck=0.1)
for(i in 1:length(trainingVect)){
lines(evalVect,kernelVect$individualKernels[i,],lty=2)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.