Learn R Programming

fsemipar (version 1.1.1)

projec: 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)

Value

A matrix containing the inner products.

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.

Author

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, tools:::Rd_expr_doi("https://doi.org/10.1080/10485252.2019.1567726").

See Also

See also semimetric.projec.

Examples

Run this code

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))

Run the code above in your browser using DataLab