Description Usage Arguments Value Author(s) References See Also Examples
Performs the testing procedures based on random projections for multivariate analysis of variance for functional data, i.e., the Wp, LHp, Pp and Rp tests. For details of the tests, see Section 2.2 of the vignette file (vignette("fdANOVA", package = "fdANOVA")
).
We consider independent vectors of random functions
\mathbf{X}_{ij}(t)=(X_{ij1}(t),…,X_{ijp}(t))^{\top}\in SP_p(\boldsymbol{μ}_i,\mathbf{Γ}),
i=1,…,l, j=1,…,n_{i} defined over the interval I=[a,b], where SP_{p}(\boldsymbol{μ},\boldsymbol{Γ}) is a set of p-dimensional stochastic processes with mean vector \boldsymbol{μ}(t), t\in I and covariance function \boldsymbol{Γ}(s, t), s,t\in I. Let n=n_1+…+n_l. In the multivariate analysis of variance problem for functional data (FMANOVA), we have to test the null hypothesis as follows:
H_0:\boldsymbol{μ}_1(t)=…=\boldsymbol{μ}_l(t),\ t\in I.
The alternative is the negation of the null hypothesis. We assume that each functional observation is observed on a common grid of \mathcal{T} design time points equally spaced in I (see Section 3.1 of the vignette file, vignette("fdANOVA", package = "fdANOVA")
).
1 2 3 4 |
x |
a list of \mathcal{T}\times n matrices of data, whose each column is a discretized version of a function and rows correspond to design time points. The mth element of this list contains the data of mth feature, m=1,…,p. |
group.label |
a vector containing group labels. |
k |
a vector of numbers of projections. |
projection |
a method of generating Gaussian processes in step 1 of the test based on random projections presented in Section 2 of the vignette file. If |
permutation |
a logical indicating whether to compute p-values by permutation method. |
B |
a number of permutation replicates. |
independent.projection.tests |
a logical indicating whether to generate the random projections independently or dependently for different elements of vector |
parallel |
a logical indicating whether to use parallelization. |
nslaves |
if |
A list with class "fmanovatrp" containing the following components (|k
| denotes the length of vector k
):
pvalues |
a 4\times | |
data.projections |
if |
and the values of used parameters.
Tomasz Gorecki, Lukasz Smaga
Cuesta-Albertos JA, Febrero-Bande M (2010). A Simple Multiway ANOVA for Functional Data. Test 19, 537-557.
Gorecki T, Smaga L (2017). Multivariate Analysis of Variance for Functional Data. Journal of Applied Statistics 44, 2172-2189.
fanova.tests
, fmanova.ptbfr
, plotFANOVA
, plot.fmanovatrp
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 28 29 | # Some of the examples may run some time.
# gait data (both features)
library(fda)
gait.data.frame <- as.data.frame(gait)
x.gait <- vector("list", 2)
x.gait[[1]] <- as.matrix(gait.data.frame[, 1:39])
x.gait[[2]] <- as.matrix(gait.data.frame[, 40:78])
# vector of group labels
group.label.gait <- rep(1:3, each = 13)
# the tests based on random projections with the Gaussian white noise generated for projections
set.seed(123)
fmanova1 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20))
summary(fmanova1)
fmanova2 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20),
permutation = TRUE, B = 1000,
parallel = TRUE, nslaves = 2)
summary(fmanova2)
# the tests based on random projections with the Brownian motion generated for projections
set.seed(123)
fmanova3 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20), projection = "BM")
summary(fmanova3)
fmanova4 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20), projection = "BM",
permutation = TRUE, B = 1000,
parallel = TRUE, nslaves = 2)
summary(fmanova4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.