Skip to contents

Approximates semi-metric distances for functional data of class fdata or fd.

Usage

semimetric.basis(
  fdata1,
  fdata2 = fdata1,
  nderiv = 0,
  type.basis1 = NULL,
  nbasis1 = NULL,
  type.basis2 = type.basis1,
  nbasis2 = NULL,
  ...
)

Arguments

fdata1

Functional data 1 or curve 1.

fdata2

Functional data 2 or curve 2.

nderiv

Order of derivation, used in deriv.fd

type.basis1

Type of Basis for fdata1.

nbasis1

Number of Basis for fdata1.

type.basis2

Type of Basis for fdata2.

nbasis2

Number of Basis for fdata2.

...

Further arguments passed to or from other methods.

Value

Returns a proximities matrix between functional data.

Details

Approximates semi-metric distances for functional data of two fd class objects. If functional data are not functional fd class, the semimetric.basis function creates a basis to represent the functional data, by default is used create.bspline.basis and the fdata class object is converted to fd class using the Data2fd.
The function calculates distances between the derivative of order nderiv of curves using deriv.fd function.

References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.

See also

Examples

if (FALSE) { # \dontrun{
data(phoneme)
DATA1<-phoneme$learn[c(30:50,210:230)]
DATA2<-phoneme$test[231:250]
a1=semimetric.basis(DATA1,DATA2)
a2=semimetric.basis(DATA1,DATA2,type.basis1="fourier",
nbasis1=11, type.basis2="fourier",nbasis2=11)
fd1 <- fdata2fd(DATA1)
fd2 <- fdata2fd(DATA2)
a3=semimetric.basis(fd1,fd2)
a4=semimetric.basis(fd1,fd2,nderiv=1)
} # }