Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

fda.usc (version 1.1.0)

h.default: Calculation of the smoothing parameter (h) for a functional data

Description

Calculation of the smoothing parameter (h) for a functional data using nonparametric kernel estimation.

Usage

h.default(fdataobj, prob=c(0.025,0.25),len=51, metric = metric.lp,
Ker = "AKer.norm", type.S ="S.NW",...)

Arguments

fdataobj
fdata class object.
prob
Range of probabilities for the quantiles of the distance matrix.
len
Vector length of smoothing parameter h to return.
metric
If is a function: name of the function to calculate the distance matrix between the curves, by default metric.lp. If is a matrix: distance matrix between the curves.
Ker
Type of asymmetric kernel used, by default asymmetric normal kernel.
type.S
Type of smothing matrix S. Possible values are: Nadaraya-Watson estimator "S.NW" and K nearest neighbors estimator "S.KNN"
...
Arguments to be passed for metric argument.

Value

  • Returns the vector of smoothing parameter or bandwidth h.

See Also

See Also as metric.lp, Kernel and S.NW. Function used in fregre.np and fregre.np.cv function.

Examples

Run this code
##  Not run 
# data(aemet)
# h1<-h.default(aemet$temp,prob=c(0.025, 0.25),len=2)
# mdist<-metric.lp(aemet$temp)
# h2<-h.default(aemet$temp,len=2,metric=mdist)
# h3<-h.default(aemet$temp,len=2,metric=semimetric.pca,q=2)
# h4<-h.default(aemet$temp,len=2,metric=semimetric.pca,q=4)
# h1;h2;h3;h4

Run the code above in your browser using DataLab