Smooth Data Using a Directly Specified Roughness Penalty
Smooth (argvals, y) data with roughness penalty defined by the
remaining arguments. This function acts as a wrapper for those who want
to bypass the step of setting up a functional parameter object before invoking
function smooth.basis
. This function simply does this setup for the
user. See the help file for functions smooth.basis
and fdPar
for further details, and more complete descriptions of the arguments.
smooth.basisPar(argvals, y, fdobj=NULL, Lfdobj=NULL, lambda=0, estimate=TRUE, penmat=NULL, wtvec=NULL, fdnames=NULL, covariates=NULL, method="chol", dfscale=1)
argvals |
a set of argument values corresponding to the observations in array
|
y |
an set of values of curves at discrete sampling points or
argument values. 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
|
fdobj |
One of the following:
|
Lfdobj |
either a nonnegative integer or a linear differential operator object. If
|
lambda |
a nonnegative real number specifying the amount of smoothing to be applied to the estimated functional parameter. |
estimate |
a logical value: if |
penmat |
a roughness penalty matrix. Including this can eliminate the need to compute this matrix over and over again in some types of calculations. |
wtvec |
typically a vector of length |
fdnames |
a list of length 3 containing character vectors of names for the following:
|
covariates |
the observed values in |
method |
by default the function uses the usual textbook equations for computing
the coefficients of the basis function expansions. But, as in regression
analysis, a price is paid in terms of rounding error for such
computations since they involved cross-products of basis function
values. Optionally, if |
dfscale |
the generalized cross-validation or "gcv" criterion that is often used
to determine the size of the smoothing parameter involves the
subtraction of an measue of degrees of freedom from |
1. if(is.null(fdobj))fdobj <- create.bspline.basis(argvals). Else if(is.integer(fdobj)) fdobj <- create.bspline.basis(argvals, norder = fdobj)
2. fdPar
3. smooth.basis
The output of a call to smooth.basis
, which is an object of
class fdSmooth
, being a list of length 8 with the following
components:
fd |
a functional data object that smooths the data. |
df |
a degrees of freedom measure of the smooth |
gcv |
the value of the generalized cross-validation or GCV criterion. If there are multiple curves, this is a vector of values, one per curve. If the smooth is multivariate, the result is a matrix of gcv values, with columns corresponding to variables. |
SSE |
the error sums of squares. SSE is a vector or a matrix of the same size as 'gcv'. |
penmat |
the penalty matrix. |
y2cMap |
the matrix mapping the data to the coefficients. |
argvals, y |
input arguments |
Ramsay, James O., and Silverman, Bernard W. (2006), Functional Data Analysis, 2nd ed., Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.
# see smooth.basis
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.