fda (version 6.1.8)

eval.bifd: Values a Two-argument Functional Data Object

Description

A vector of argument values for the first argument s of the functional data object to be evaluated.

Usage

eval.bifd(sevalarg, tevalarg, bifd, sLfdobj=0, tLfdobj=0)

Value

an array of 2, 3, or 4 dimensions containing the function values. The first dimension corresponds to the argument values in sevalarg, the second to argument values in tevalarg, the third if present to replications, and the fourth if present to functions.

Arguments

sevalarg

a vector of argument values for the first argument s of the functional data object to be evaluated.

tevalarg

a vector of argument values for the second argument t of the functional data object to be evaluated.

bifd

a two-argument functional data object.

sLfdobj

either a nonnegative integer or a linear differential operator object. If present, the derivative or the value of applying the operator to the object as a function of the first argument s is evaluated rather than the functions themselves.

tLfdobj

either a nonnegative integer or a linear differential operator object. If present, the derivative or the value of applying the operator to the object as a function of the second argument t is evaluated rather than the functions themselves.

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.

Examples

Run this code
# every-other-day basis to save test time
daybasis   <- create.fourier.basis(c(0,365), 183)
harmLcoef  <- c(0,(2*pi/365)^2,0)
harmLfd    <- vec2Lfd(harmLcoef, c(0,365))
templambda <- 1.0
tempfdPar  <- fdPar(fd(matrix(0,daybasis$nbasis,1), daybasis), harmLfd, 
                    lambda=1)
tempfd     <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"Temperature.C"], 
                           tempfdPar)$fd
#    define the variance-covariance bivariate fd object
tempvarbifd <- var.fd(tempfd)
#    evaluate the variance-covariance surface and plot
weektime    <- seq(0,365,len=53)
tempvarmat  <- eval.bifd(weektime,weektime,tempvarbifd)
#    make a perspective plot of the variance function
oldpar <- par(no.readonly=TRUE)
persp(tempvarmat)
par(oldpar)

Run the code above in your browser using DataLab