Description Usage Arguments Details Value Side Effects Source See Also Examples
tperm.fd creates a null distribution for a test of no difference between two groups of functional data objects.
1 |
x1fd |
a functional data object giving the first group of functional observations. |
x2fd |
a functional data object giving the second group of functional observations. |
nperm |
number of permutations to use in creating the null distribution. |
q |
Critical upper-tail quantile of the null distribution to compare to the observed t-statistic. |
argvals |
If |
plotres |
Argument to plot a visual display of the null distribution
displaying the |
... |
Additional plotting arguments that can be used with |
The usual t-statistic is calculated pointwise and the test based on
the maximal value. If argvals
is not specified, it defaults
to 101 equally-spaced points on the range of yfdPar
.
A list with the following components:
pval |
the observed p-value of the permutation test. |
qval |
the |
Tobs |
the observed maximal t-statistic. |
Tnull |
a vector of length |
Tvals |
the pointwise values of the observed t-statistic. |
Tnullvals |
the pointwise values of of the permutation observations. |
pvals.pts |
pointwise p-values of the t-statistic. |
qvals.pts |
pointwise |
argvals |
argument values for evaluating the F-statistic if |
a plot of the functional observations
Ramsay, James O., and Silverman, Bernard W. (2006), Functional Data Analysis, 2nd ed., Springer, New York.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.