Learn R Programming

fda (version 2.4.0)

bifd: Create a bivariate functional data object

Description

This function creates a bivariate functional data object, which consists of two bases for expanding a functional data object of two variables, s and t, and a set of coefficients defining this expansion. The bases are contained in "basisfd" objects.

Usage

bifd (coef=matrix(0,2,1), sbasisobj=create.bspline.basis(),
      tbasisobj=create.bspline.basis(), fdnames=defaultnames)

Arguments

coef
a two-, three-, or four-dimensional array containing coefficient values for the expansion of each set of bivariate function values=terms of a set of basis function values

If 'coef' is two dimensional, this implies that there is only one v

sbasisobj
a functional data basis object for the first argument s of the bivariate function.
tbasisobj
a functional data basis object for the second argument t of the bivariate function.
fdnames
A list of length 4 containing dimnames for 'coefs' if it is a 4-dimensional array. If it is only 2- or 3-dimensional, the later components of fdnames are not applied to 'coefs'. In any event, the components of fdnames describe the following:

Value

  • A bivariate functional data object = a list of class 'bifd' with the following components:
  • coefsthe input 'coefs' possible with dimnames from dfnames if provided or from sbasisobj$names and tbasisobsj$names
  • sbasisobja functional data basis object for the first argument s of the bivariate function.
  • tbasisobja functional data basis object for the second argument t of the bivariate function.
  • bifdnamesa list of length 4 giving names for the dimensions of coefs, with one or two unused lists of names if length(dim(coefs)) is only two or one, respectively.

See Also

basisfd objAndNames

Examples

Run this code
Bspl2 <- create.bspline.basis(nbasis=2, norder=1)
Bspl3 <- create.bspline.basis(nbasis=3, norder=2)

(bBspl2.3 <- bifd(array(1:6, dim=2:3), Bspl2, Bspl3))
str(bBspl2.3)

Run the code above in your browser using DataLab