smooth.sparse.mean: Smooth the mean function of sparse data

View source: R/smooth.sparse.mean.R

smooth.sparse.meanR Documentation

Smooth the mean function of sparse data


Do a smoothing of the mean function for sparse data that is either given as a list or as a matrix with NAs. The smooth is done by basis expansion with the functional basis "type"; if !(lambda == 0) then the second derivative is penalized (int2Lfd(2)).


smooth.sparse.mean(data, time ,rng = c(0, 1), type = "", nbasis = NULL, 
                  knots = NULL, norder = NULL, lambda = NULL)



a matrix object or list – If the set is supplied as a matrix object, the rows must correspond to argument values and columns to replications, and it will be assumed that there is only one variable per observation. If y is a three-dimensional array, the first dimension corresponds to argument values, the second to replications, and the third to variables within replications. – If it is a list, each element must be a matrix object, the rows correspond to argument values per individual. First column corresponds to time points and followins columns to argument values per variable.


Array with time points where data was taken. length(time) == ncol(data)


an array of length 2 containing the lower and upper boundaries for the rangeval of argument values


Type of basisfd for smoothing the mean estimate function. "bspline", "fourier", "exp", "const" or "mon"


An integer variable specifying the number of basis functions


a vector specifying the break points if type == "bspline"


an integer specifying the order of b-splines if type == "bspline"


a nonnegative real number specifying the amount of smoothing to be applied to the estimated functional parameter


a functional data object containing a smooth of the mean.


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.

fda documentation built on May 29, 2024, 11:26 a.m.