The data sample from which the estimate is to be computed.
h
The bandwidth or smoothing parameter.
type_data
The data sample type. Data can be continuous or discrete (categorical or count). Here, in this function , we deal with continuous data.
ker
A character string giving the smoothing kernel to be used which is the associated kernel: "BE" extended beta, "GA" gamma, "LN" lognormal and "RIG" reciprocal inverse Gaussian.
x
The points of the grid at which the density is to be estimated.
a0
The left bound of the support used for extended beta kernel. Default value is 0 for beta kernel.
a1
The right bound of the support used for extended beta kernel. Default value is 1 for beta kernel.
## A sample data with n=100.
V<-rgamma(100,1.5,2.6)
##The bandwidth can be the one obtained by cross validation.
h<-0.052
## We choose Gamma kernel.
est<-dke.fun(V,h,"continuous","GA")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Ake)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Ake/dke.fun.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dke.fun
> ### Title: Function for density estimation
> ### Aliases: dke.fun dke.fun.default
> ### Keywords: smooth nonparametric
>
> ### ** Examples
>
> ## A sample data with n=100.
> V<-rgamma(100,1.5,2.6)
> ##The bandwidth can be the one obtained by cross validation.
> h<-0.052
> ## We choose Gamma kernel.
>
> est<-dke.fun(V,h,"continuous","GA")
>
>
>
>
>
> dev.off()
null device
1
>