Description Usage Arguments Details Value References See Also Examples
View source: R/plugin.select.R
Select the plug-in bandwidth described in Benhenni and Degras (2011) for the local polynomial estimation of a mean function and its first derivative based on functional data.
1 | plugin.select(x, y, drv = 0L, degree = drv+1L, gridsize = length(x), ...)
|
x |
numeric vector of x data. This observation grid must be uniform and missing values are not accepted. |
y |
matrix or data frame with functional observations (= curves) stored in rows. The number of columns of |
drv |
order of the derivative to estimate. Must be 0 or 1. |
degree |
degree of local polynomial used. Must equal |
gridsize |
the size of the grid over which the mean function is to be estimated.
Defaults to |
... |
additional arguments to pass to the optimizer of the CV score. |
The plug-in method should not be used with small data sets, since it is based on asymptotic considerations and requires reasonably accurate estimates of derivatives of the mean and covariance functions. Both the number of observed curves and observation points should be moderate to large. The plug-in bandwidth is designed to minimize the asymptotic mean integrated squared estimation error
AMISE(h) = integral of (μ(t) - μ.hat(t;h))^2,
where μ(t) is the mean function and mu.hat(t;h) is a local polynomial estimator with kernel bandwidth h. The expression of the plug-in bandwidth can be found in Benhenni and Degras (2011).
the plug-in bandwidth.
Benhenni, K. and Degras, D. (2011). Local polynomial estimation of the average growth curve with functional data. http://arxiv.org/abs/1107.4058
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
## Phoneme data
data(phoneme)
classes <- phoneme[,151]
phoneme <- phoneme[,-151]
freq <- 1:150
plugin.bandwidth <- numeric(5)
cv.bandwidth <- numeric(5) # compare with cross-validation
for (i in 1:5) {
plugin.bandwidth[i] <- plugin.select(x = freq, y = phoneme[classes == i, ],
drv = 0, degree = 1)
cv.bandwidth[i] <- cv.select(x = freq, y = phoneme[classes == i, ],
degree = 1)
}
round(cbind(plugin.bandwidth, cv.bandwidth), 4)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.