tperm.fd(x1fd, x2fd, nperm=200, q=0.05, argvals=NULL, plotres=TRUE, ...)
yfdPar
is a fd
object, the points at which to
evaluate the point-wise t-statistic.1-q
th quantile and observed t-statistic.plot
.q
th quantile of the null distribution.nperm
giving the observed values of the
permutation distribution.q
th quantiles of the null distributionyfdPar
is
a functional data object.argvals
is not specified, it defaults
to 101 equally-spaced points on the range of yfdPar
.fRegress
Fstat.fd
# This tests the difference between boys and girls heights in the
# Berkeley growth data.
# First set up a basis system to hold the smooths
knots <- growth$age
norder <- 6
nbasis <- length(knots) + norder - 2
hgtbasis <- create.bspline.basis(range(knots), nbasis, norder, knots)
# Now smooth with a fourth-derivative penalty and a very small smoothing
# parameter
Lfdobj <- 4
lambda <- 1e-2
growfdPar <- fdPar(hgtbasis, Lfdobj, lambda)
hgtmfd <- smooth.basis(growth$age, growth$hgtm, growfdPar)$fd
hgtffd <- smooth.basis(growth$age, growth$hgtf, growfdPar)$fd
# Call tperm.fd
tres <- tperm.fd(hgtmfd,hgtffd)
Run the code above in your browser using DataLab