Description Usage Arguments Value References Examples
Wrapper function which does some preparatory calculations and then calls the actual “workhorse” functions which do the main computations for kernel adaptive density estimation of Srihera & Stute (2011) or Eichner & Stute (2013). Finally, it structures and returns the obtained results. Summarizing information and technical details can be found in Eichner (2017).
1 2 3 4 
x 
Vector of location(s) at which the density estimate is to be computed. 
data 
Vector (X_1, …, X_n) of the data from which the
estimate is to be computed. 
kernel 
A character string naming the kernel to be used for the adaptive estimator. This must partially match one of "gaussian", "rectangular" or "epanechnikov", with default "gaussian", and may be abbreviated to a unique prefix. (Currently, this kernel is also used for the initial, nonadaptive ParzenRosenblatt estimator which enters into the estimators of bias and variance as described in the references.) 
method 
A character string naming the method to be used for the adaptive estimator. This must partially match one of "both", "ranktrafo" or "nonrobust", with default "both", and may be abbreviated to a unique prefix. 
Sigma 
Vector of value(s) of the scale parameter σ.
If of length 1 no adaptation is performed. Otherwise
considered as the initial grid over which the optimization
of the adaptive method will be performed. Defaults to

h 
Numeric scalar for bandwidth h. Defaults to NULL and is then internally set to n^{1/5}. 
theta 
Numeric scalar for value of location parameter θ. Defaults to NULL and is then internally set to the arithmetic mean of x_1, …, x_n. 
ranktrafo 
Function used for the rank transformation. Defaults to

ticker 
Logical; determines if a 'ticker' documents the iteration
progress through 
plot 
Logical or character or numeric and indicates if graphical
output should be produced. Defaults to FALSE (i.e., no
graphical output is produced) and is passed to

parlist 
A list of graphical parameters that is passed to

... 
Further arguments possibly passed down. Currently ignored. 
In the case of only one method a data frame whose components have the following names and meanings:
x  x_0. 
y  Estimate of f(x_0). 
sigma.adap  The found minimizer of the MSEestimator, i.e., the adaptive smoothing parameter value. 
msehat.min  The found minimum of the MSEestimator. 
discr.min.smaller  TRUE iff the numerically found minimum was smaller than the discrete one. 
sig.range.adj  Number of adjustments of sigmarange. 
In the case of both methods a list of two data frames of the just described structure.
Srihera & Stute (2011), Eichner & Stute (2013), and Eichner
(2017): see kader
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  require(stats)
# Generating N(0,1)data
set.seed(2017); n < 80; d < rnorm(n)
# Estimating f(x0) for one sigmavalue
x0 < 1
(fit < kade(x = x0, data = d, method = "nonrobust", Sigma = 1))
# Estimating f(x0) for sigmagrid
x0 < 1
(fit < kade(x = x0, data = d, method = "nonrobust",
Sigma = seq(0.01, 10, length = 10), ticker = TRUE))
## Not run:
# Estimating f(x0) for sigmagrid and OldFaithfuleruptionsdata
x0 < 2
(fit < kade(x = x0, data = faithful$eruptions, method = "nonrobust",
Sigma = seq(0.01, 10, length = 51), ticker = TRUE, plot = TRUE))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.