Learn R Programming

fda (version 6.2.0)

monomial: Evaluate Monomial Basis

Description

Computes the values of the powers of argument t.

Usage

monomial(evalarg, exponents=1, nderiv=0, argtrans=c(0,1))

Value

a matrix of values of basis functions. Rows correspond to argument values and columns to basis functions.

Arguments

evalarg

a vector of argument values.

exponents

a vector of nonnegative integer values specifying the powers to be computed.

nderiv

a nonnegative integer specifying the order of derivative to be evaluated.

argtrans

Linearly transform an argument before constructing a basis. The first element is the shift in value and the second the scale factor.

References

Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.

See Also

power, expon, fourier, polyg, bsplineS

Examples

Run this code

# set up a monomial basis for the first five powers
nbasis   <- 5
basisobj <- create.monomial.basis(c(-1,1),nbasis)
#  evaluate the basis
tval <- seq(-1,1,0.1)
basismat <- monomial(tval, 1:basisobj$nbasis)

Run the code above in your browser using DataLab