projec {fsemipar}R Documentation

Inner product computation

Description

Computes the inner product between each curve collected in data and a particular curve \theta.

Usage

projec(data, theta, order.Bspline = 3, nknot.theta = 3, range.grid = NULL, nknot = NULL)

Arguments

data

Matrix containing functional data collected by row

theta

Vector containing the coefficients of \theta in a B-spline basis, so that length(theta)=order.Bspline+nknot.theta

order.Bspline

Order of the B-spline basis functions for the B-spline representation of \theta. This is the number of coefficients in each piecewise polynomial segment. The default is 3.

nknot.theta

Number of regularly spaced interior knots of the B-spline basis. The default is 3.

range.grid

Vector of length 2 containing the range of the discretisation of the functional data. If range.grid=NULL, then range.grid=c(1,p) is considered, where p is the discretisation size of data (i.e. ncol(data)).

nknot

Number of regularly spaced interior knots for the B-spline representation of the functional data. The default value is (p - order.Bspline - 1)%/%2.

Value

A matrix containing the inner products.

Note

The construction of this code is based on that by Frederic Ferraty, which is available on his website https://www.math.univ-toulouse.fr/~ferraty/SOFTWARES/NPFDA/index.html.

Author(s)

German Aneiros Perez german.aneiros@udc.es

Silvia Novo Diaz snovo@est-econ.uc3m.es

References

Novo S., Aneiros, G., and Vieu, P., (2019) Automatic and location-adaptive estimation in functional single–index regression. Journal of Nonparametric Statistics, 31(2), 364–392, doi:10.1080/10485252.2019.1567726.

See Also

See also semimetric.projec.

Examples


data("Tecator")
names(Tecator)
y<-Tecator$fat
X<-Tecator$absor.spectra

#length(theta)=6=order.Bspline+nknot.theta 
projec(X,theta=c(1,0,0,1,1,-1),nknot.theta=3,nknot=20,range.grid=c(850,1050))

[Package fsemipar version 1.1.1 Index]