Description Usage Arguments Details Value Source See Also Examples
View source: R/register.newfd.R
This function registers a new functional data object to pre-computed warping functions.
1 | register.newfd(yfd, Wfd,type=c('direct','monotone','periodic'))
|
yfd |
a multivariate functional data object defining the functions to be
registered with |
Wfd |
a functional data object defining the registration functions to be used
to register |
type |
indicates the type of registration function.
|
Only shift registration is considered for the periodic case.
a functional data object defining the registered curves.
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, ch. 6 & 7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Register the lip data with landmark registration, then register the first
# derivatives with the pre-computed warping functions.
# Lip data:
lipfd <- smooth.basisPar(liptime, lip, 6, Lfdobj=int2Lfd(4),
lambda=1e-12)$fd
names(lipfd$fdnames) <- c("time(seconds)", "replications", "mm")
# Landmark Registration:
lipmeanmarks <- apply(lipmarks,2,mean)
wnbasis <- 6
wnorder <- 4
wbreaks <- c(0,lipmeanmarks,0.35)
warpbasis <- create.bspline.basis(nbasis=wnbasis, norder=wnorder,
breaks=wbreaks);
WfdPar <- fdPar(fd(basisobj=warpbasis), 2, 1e-4)
lipreglist <- landmarkreg(lipfd, as.matrix(lipmarks), lipmeanmarks, WfdPar)
# And warp:
Dlipfd = deriv.fd(lipfd,Lfdobj=1)
Dlipregfd = register.newfd(Dlipfd,lipreglist$warpfd,type='direct')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.