Revision 8ce7a357abaac720c40ee86e2c8f98a586467b68 authored by J. O. Ramsay on 03 November 2009, 00:00:00 UTC, committed by Gabor Csardi on 03 November 2009, 00:00:00 UTC
1 parent a651a3c
smooth.basisPar.R
smooth.basisPar <- function(argvals, y, fdobj=NULL, Lfdobj=NULL,
lambda=0, estimate=TRUE, penmat=NULL,
wtvec=rep(1, length(argvals)), fdnames=NULL ){
##
## 1. fdobj
##
{
if(is.null(fdobj))
fdobj <- create.bspline.basis(argvals)
else {
if(is.numeric(fdobj)){
if(length(fdobj)==1) {
if(round(fdobj) != fdobj)
stop("'fdobj' is numeric but not an integer")
fdobj <- create.bspline.basis(argvals, norder=fdobj)
}
else
fdobj <- fd(fdobj)
}
}
}
##
## 2. fdPar
##
fdP <- fdPar(fdobj, Lfdobj=Lfdobj, lambda=lambda,
estimate=estimate, penmat=penmat)
##
## 3. smooth.fd
##
# n <- length(argvals)
w <- wtvec
# smoothB <- smooth.basis(argvals, y, fdP, wtvec=w,
# dffactor=dffactor, fdnames=fdnames)
smooth.basis(argvals, y, fdP, wtvec=w, fdnames=fdnames)
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...