Learn R Programming

fda (version 2.4.0)

create.exponential.basis: Create an Exponential Basis

Description

Create an exponential basis object defining a set of exponential functions with rate constants in argument ratevec.

Usage

create.exponential.basis(rangeval=c(0,1), nbasis=NULL, ratevec=NULL,
                         dropind=NULL, quadvals=NULL, values=NULL,
                         basisvalues=NULL, names='exp', axes=NULL)

Arguments

rangeval
a vector of length 2 containing the initial and final values of the interval over which the functional data object can be evaluated.
nbasis
the number of basis functions. Default = if(is.null(ratevec)) 2 else length(ratevec).
ratevec
a vector of length nbasis of rate constants defining basis functions of the form exp(rate*x). Default = 0:(nbasis-1).
dropind
a vector of integers specifiying the basis functions to be dropped, if any. For example, if it is required that a function be zero at the left boundary, this is achieved by dropping the first basis function, the only one that is nonzero at th
quadvals
a matrix with two columns and a number of rows equal to the number of quadrature points for numerical evaluation of the penalty integral. The first column of quadvals contains the quadrature points, and the second column the quad
values
a list of matrices with one row for each row of quadvals and one column for each basis function. The elements of the list correspond to the basis functions and their derivatives evaluated at the quadrature points contained in the
basisvalues
A list of lists, allocated by code such as vector("list",1). This field is designed to avoid evaluation of a basis system repeatedly at a set of argument values. Each list within the vector corresponds to a specific set of argument values, a
names
either a character vector of the same length as the number of basis functions or a simple stem used to construct such a vector.

For exponential bases, this defaults to paste('exp', 0:(nbasis-1), sep='').

axes
an optional list used by selected plot functions to create custom axes. If this axes argument is not NULL, functions plot.basisfd, plot.fd, plot.fdSmooth

Value

  • a basis object with the type expon.

Details

Exponential functions are of the type $exp(bx)$ where $b$ is the rate constant. If $b = 0$, the constant function is defined.

See Also

basisfd, create.bspline.basis, create.constant.basis, create.fourier.basis, create.monomial.basis, create.polygonal.basis, create.polynomial.basis, create.power.basis

Examples

Run this code
#  Create an exponential basis over interval [0,5]
#  with basis functions 1, exp(-t) and exp(-5t)
basisobj <- create.exponential.basis(c(0,5),3,c(0,-1,-5))
#  plot the basis
plot(basisobj)

Run the code above in your browser using DataLab