Title: | Analysis of Variance for Univariate and Multivariate Functional Data |
---|---|
Description: | Performs analysis of variance testing procedures for univariate and multivariate functional data (Cuesta-Albertos and Febrero-Bande (2010) <doi:10.1007/s11749-010-0185-3>, Gorecki and Smaga (2015) <doi:10.1007/s00180-015-0555-0>, Gorecki and Smaga (2017) <doi:10.1080/02664763.2016.1247791>, Zhang et al. (2018) <doi:10.1016/j.csda.2018.05.004>). |
Authors: | Tomasz Gorecki, Lukasz Smaga |
Maintainer: | Lukasz Smaga <[email protected]> |
License: | LGPL-2 | LGPL-3 | GPL-2 | GPL-3 |
Version: | 0.1.2 |
Built: | 2025-01-30 03:22:01 UTC |
Source: | https://github.com/cran/fdANOVA |
Performs the testing procedures for the one-way analysis of variance for (univariate) functional data (FANOVA). See Section 2.1 of the vignette file (vignette("fdANOVA", package = "fdANOVA")
), for details of the tests.
We consider the groups of independent random functions
,
defined over a closed and bounded interval
. Let
. These groups may differ in mean functions, i.e., we assume that
,
are stochastic processes with mean function
,
and covariance function
,
, for
. Of interest is to test the following null hypothesis
The alternative is the negation of the null hypothesis. We assume that each functional observation is observed on a common grid of design time points equally spaced in
(see Section 3.1 of the vignette file,
vignette("fdANOVA", package = "fdANOVA")
).
fanova.tests(x = NULL, group.label, test = "ALL", params = NULL, parallel = FALSE, nslaves = NULL) # more detailed usage of params: # params = list(paramFP = list(int, B.FP = 1000, # basis = c("Fourier", "b-spline", "own"), # own.basis, own.cross.prod.mat, # criterion = c("BIC", "eBIC", "AIC", "AICc", "NO"), # commonK = c("mode", "min", "max", "mean"), # minK = NULL, maxK = NULL, norder = 4, gamma.eBIC = 0.5) # paramCH = 10000, # paramCS = 10000, # paramL2b = 10000, # paramFb = 10000, # paramFmaxb = 10000, # paramTRP = list(k = 30, projection = c("GAUSS", "BM"), # permutation = FALSE, B.TRP = 10000, # independent.projection.tests = TRUE))
fanova.tests(x = NULL, group.label, test = "ALL", params = NULL, parallel = FALSE, nslaves = NULL) # more detailed usage of params: # params = list(paramFP = list(int, B.FP = 1000, # basis = c("Fourier", "b-spline", "own"), # own.basis, own.cross.prod.mat, # criterion = c("BIC", "eBIC", "AIC", "AICc", "NO"), # commonK = c("mode", "min", "max", "mean"), # minK = NULL, maxK = NULL, norder = 4, gamma.eBIC = 0.5) # paramCH = 10000, # paramCS = 10000, # paramL2b = 10000, # paramFb = 10000, # paramFmaxb = 10000, # paramTRP = list(k = 30, projection = c("GAUSS", "BM"), # permutation = FALSE, B.TRP = 10000, # independent.projection.tests = TRUE))
x |
a |
group.label |
a vector containing group labels. |
test |
a kind of indicator which establishes a choice of FANOVA tests to be performed. Its default value means that all testing procedures of Section 2.1 of the vignette file will be used. When we want to use only some tests, the parameter |
params |
a list of additional parameters for the FP, CH, CS, L |
paramFP |
a list containing the parameters for the FP test. |
int |
a vector of two elements representing the interval |
B.FP |
a number of permutation replicates for the FP tests. |
basis |
a choice of basis of functions used in the basis function representation of the data. |
own.basis |
if |
own.cross.prod.mat |
if |
criterion |
a choice of information criterion for selecting the optimum value of
and
where
|
commonK |
a choice of method for selecting the common value for all observations from the values of |
minK |
a minimum value of |
maxK |
a maximum value of |
norder |
if |
gamma.eBIC |
a |
paramCH |
a number of discretized artificial trajectories for generating Gaussian processes for the CH test. |
paramCS |
a number of discretized artificial trajectories for generating Gaussian processes for the CS test. |
paramL2b |
a number of bootstrap samples for the L |
paramFb |
a number of bootstrap samples for the Fb test. |
paramFmaxb |
a number of bootstrap samples for the Fmaxb test. |
paramTRP |
a list containing the parameters of the tests based on random projections. |
k |
a vector of numbers of projections. |
projection |
a method of generating Gaussian processes in step 1 of the tests based on random projections presented in Section 2 of the vignette file. If |
permutation |
a logical indicating whether to compute p-values of the tests based on random projections by permutation method. |
B.TRP |
a number of permutation replicates for the tests based on random projections. |
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 |
To perform step 3 of the projection procedure given in Section 2.1 of the vignette file, we use five tests: the standard (paramTRP$permutation = FALSE
) and permutation (paramTRP$permutation
= TRUE
) tests based on ANOVA F-test statistic and ANOVA-type statistic (ATS) proposed by Brunner et al. (1997), as well as the testing procedure based on Wald-type permutation statistic (WTPS) of Pauly et al. (2015).
A list with class "fanovatests" containing the following components (|k
| denotes the length of vector k
):
FP |
a list containing value of test statistic |
CH |
a list containing value of test statistic |
CS |
a list containing value of test statistic |
L2N |
a list containing value of test statistic |
L2B |
a list containing value of test statistic |
L2b |
a list containing value of test statistic |
FN |
a list containing value of test statistic |
FB |
a list containing value of test statistic |
Fb |
a list containing value of test statistic |
GPF |
a list containing value of test statistic |
Fmaxb |
a list containing value of test statistic |
TRP |
a list containing the following elements: vectors |
and the values of other used parameters: data = x
, group.label
, etc.
Tomasz Gorecki, Lukasz Smaga
Brunner E, Dette H, Munk A (1997). Box-Type Approximations in Nonparametric Factorial Designs. Journal of the American Statistical Association 92, 1494-1502.
Cuesta-Albertos JA, Febrero-Bande M (2010). A Simple Multiway ANOVA for Functional Data. Test 19, 537-557.
Cuevas A, Febrero M, Fraiman R (2004). An Anova Test for Functional Data. Computational Statistics & Data Analysis 47, 111-122.
Faraway J (1997). Regression Analysis for a Functional Response. Technometrics 39, 254-261.
Gorecki T, Smaga L (2015). A Comparison of Tests for the One-Way ANOVA Problem for Functional Data. Computational Statistics 30, 987-1010.
Gorecki T, Smaga L (2017). Multivariate Analysis of Variance for Functional Data. Journal of Applied Statistics 44, 2172-2189.
Pauly M, Brunner E, Konietschke F (2015). Asymptotic Permutation Tests in General Factorial Designs. Journal of the Royal Statistical Society Series B 77, 461-473.
Shen Q, Faraway J (2004). An F Test for Linear Models with Functional Responses. Statistica Sinica 14, 1239-1257.
Zhang JT (2011). Statistical Inferences for Linear Models with Functional Responses. Statistica Sinica 21, 1431-1451.
Zhang JT (2013). Analysis of Variance for Functional Data. Chapman & Hall, London.
Zhang JT, Chen JW (2007). Statistical Inferences for Functional Data. The Annals of Statistics 35, 1052-1079.
Zhang JT, Cheng MY, Wu HT, Zhou B (2018). A New Test for Functional One-way ANOVA with Applications to Ischemic Heart Screening. Computational Statistics and Data Analysis https://doi.org/10.1016/j.csda.2018.05.004
Zhang JT, Liang X (2014). One-Way ANOVA for Functional Data via Globalizing the Pointwise F-Test. Scandinavian Journal of Statistics 41, 51-71.
fmanova.ptbfr
, fmanova.trp
, plotFANOVA
, plot.fanovatests
# Some of the examples may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) (fanova1 <- fanova.tests(x = x.gait, group.label = group.label.gait)) summary(fanova1) # data projections generated in the test based on random projections fanova1$TRP$data.projections # only three tests with non-default parameters set.seed(123) fanova2 <- fanova.tests(x.gait, group.label.gait, test = c("FP", "GPF", "Fmaxb"), params = list(paramFP = list(int = c(0.025, 0.975), B.FP = 1000, basis = "b-spline", criterion = "eBIC", commonK = "mean", minK = 5, maxK = 20, norder = 4, gamma.eBIC = 0.7), paramFmaxb = 1000)) summary(fanova2) # the FP test with predefined basis function representation library(fda) fbasis <- create.bspline.basis(rangeval = c(0.025, 0.975), 19, norder = 4) own.basis <- Data2fd(seq(0.025, 0.975, length = 20), x.gait, fbasis)$coefs own.cross.prod.mat <- inprod(fbasis, fbasis) set.seed(123) fanova3 <- fanova.tests(group.label = group.label.gait, test = "FP", params = list(paramFP = list(B.FP = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat))) summary(fanova3) # the tests based on random projections with the Gaussian white noise generated for projections set.seed(123) fanova4 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), B.TRP = 1000))) summary(fanova4) set.seed(123) fanova5 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), permutation = TRUE, B.TRP = 1000))) summary(fanova5) # the tests based on random projections with the Brownian motion generated for projections set.seed(123) fanova6 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", B.TRP = 1000))) summary(fanova6) set.seed(123) fanova7 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", permutation = TRUE, B.TRP = 1000))) summary(fanova7)
# Some of the examples may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) (fanova1 <- fanova.tests(x = x.gait, group.label = group.label.gait)) summary(fanova1) # data projections generated in the test based on random projections fanova1$TRP$data.projections # only three tests with non-default parameters set.seed(123) fanova2 <- fanova.tests(x.gait, group.label.gait, test = c("FP", "GPF", "Fmaxb"), params = list(paramFP = list(int = c(0.025, 0.975), B.FP = 1000, basis = "b-spline", criterion = "eBIC", commonK = "mean", minK = 5, maxK = 20, norder = 4, gamma.eBIC = 0.7), paramFmaxb = 1000)) summary(fanova2) # the FP test with predefined basis function representation library(fda) fbasis <- create.bspline.basis(rangeval = c(0.025, 0.975), 19, norder = 4) own.basis <- Data2fd(seq(0.025, 0.975, length = 20), x.gait, fbasis)$coefs own.cross.prod.mat <- inprod(fbasis, fbasis) set.seed(123) fanova3 <- fanova.tests(group.label = group.label.gait, test = "FP", params = list(paramFP = list(B.FP = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat))) summary(fanova3) # the tests based on random projections with the Gaussian white noise generated for projections set.seed(123) fanova4 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), B.TRP = 1000))) summary(fanova4) set.seed(123) fanova5 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), permutation = TRUE, B.TRP = 1000))) summary(fanova5) # the tests based on random projections with the Brownian motion generated for projections set.seed(123) fanova6 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", B.TRP = 1000))) summary(fanova6) set.seed(123) fanova7 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", permutation = TRUE, B.TRP = 1000))) summary(fanova7)
Performs the permutation tests based on a basis function representation for multivariate analysis of variance for functional data, i.e., the W, LH, P and R 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
defined over the interval
, where
is a set of
-dimensional stochastic processes with mean vector
,
and covariance function
,
. Let
. In the multivariate analysis of variance problem for functional data (FMANOVA), we have to test the null hypothesis as follows:
The alternative is the negation of the null hypothesis. We assume that each functional observation is observed on a common grid of design time points equally spaced in
(see Section 3.1 of the vignette file,
vignette("fdANOVA", package = "fdANOVA")
).
fmanova.ptbfr(x = NULL, group.label, int, B = 1000, parallel = FALSE, nslaves = NULL, basis = c("Fourier", "b-spline", "own"), own.basis, own.cross.prod.mat, criterion = c("BIC", "eBIC", "AIC", "AICc", "NO"), commonK = c("mode", "min", "max", "mean"), minK = NULL, maxK = NULL, norder = 4, gamma.eBIC = 0.5)
fmanova.ptbfr(x = NULL, group.label, int, B = 1000, parallel = FALSE, nslaves = NULL, basis = c("Fourier", "b-spline", "own"), own.basis, own.cross.prod.mat, criterion = c("BIC", "eBIC", "AIC", "AICc", "NO"), commonK = c("mode", "min", "max", "mean"), minK = NULL, maxK = NULL, norder = 4, gamma.eBIC = 0.5)
x |
a list of |
group.label |
a vector containing group labels. |
int |
a vector of two elements representing the interval |
B |
a number of permutation replicates. |
parallel |
a logical indicating whether to use parallelization. |
nslaves |
if |
basis |
a choice of basis of functions used in the basis function representation of the data. |
own.basis |
if |
own.cross.prod.mat |
if |
criterion |
a choice of information criterion for selecting the optimum value of |
commonK |
a choice of method for selecting the common value for all observations from the values of |
minK |
a minimum value of |
maxK |
a maximum value of |
norder |
if |
gamma.eBIC |
a |
A list with class "fmanovaptbfr" containing the following components:
W |
a value of the statistic W. |
pvalueW |
p-value for the W test. |
LH |
a value of the statistic LH. |
pvalueLH |
p-value for the LH test. |
P |
a value of the statistic P. |
pvalueP |
p-value for the P test. |
R |
a value of the statistic R. |
pvalueR |
p-value for the R test, |
the values of parameters used and eventually
data |
a list containing the data given in |
Km |
a vector |
KM |
a maximum of a vector |
Tomasz Gorecki, Lukasz Smaga
Gorecki T, Smaga L (2015). A Comparison of Tests for the One-Way ANOVA Problem for Functional Data. Computational Statistics 30, 987-1010.
Gorecki T, Smaga L (2017). Multivariate Analysis of Variance for Functional Data. Journal of Applied Statistics 44, 2172-2189.
fanova.tests
, fmanova.trp
, plotFANOVA
# 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 a basis function representation with default parameters set.seed(123) (fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait)) summary(fmanova1) # the tests based on a basis function representation with non-default parameters set.seed(123) fmanova2 <- fmanova.ptbfr(x.gait, group.label.gait, int = c(0.025, 0.975), B = 5000, basis = "b-spline", criterion = "eBIC", commonK = "mean", minK = 5, maxK = 20, norder = 4, gamma.eBIC = 0.7) summary(fmanova2) # the tests based on a basis function representation # with predefined basis function representation library(fda) fbasis <- create.fourier.basis(c(0, nrow(x.gait[[1]])), 17) own.basis <- vector("list", 2) own.basis[[1]] <- Data2fd(1:nrow(x.gait[[1]]), x.gait[[1]], fbasis)$coefs own.basis[[2]] <- Data2fd(1:nrow(x.gait[[2]]), x.gait[[2]], fbasis)$coefs own.cross.prod.mat <- diag(rep(1, 17)) set.seed(123) fmanova3 <- fmanova.ptbfr(group.label = group.label.gait, B = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat) summary(fmanova3) library(fda) fbasis <- create.bspline.basis(c(0, nrow(x.gait[[1]])), 20, norder = 4) own.basis <- vector("list", 2) own.basis[[1]] <- Data2fd(1:nrow(x.gait[[1]]), x.gait[[1]], fbasis)$coefs own.basis[[2]] <- Data2fd(1:nrow(x.gait[[2]]), x.gait[[2]], fbasis)$coefs own.cross.prod.mat <- inprod(fbasis, fbasis) set.seed(123) fmanova4 <- fmanova.ptbfr(group.label = group.label.gait, B = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat) summary(fmanova4)
# 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 a basis function representation with default parameters set.seed(123) (fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait)) summary(fmanova1) # the tests based on a basis function representation with non-default parameters set.seed(123) fmanova2 <- fmanova.ptbfr(x.gait, group.label.gait, int = c(0.025, 0.975), B = 5000, basis = "b-spline", criterion = "eBIC", commonK = "mean", minK = 5, maxK = 20, norder = 4, gamma.eBIC = 0.7) summary(fmanova2) # the tests based on a basis function representation # with predefined basis function representation library(fda) fbasis <- create.fourier.basis(c(0, nrow(x.gait[[1]])), 17) own.basis <- vector("list", 2) own.basis[[1]] <- Data2fd(1:nrow(x.gait[[1]]), x.gait[[1]], fbasis)$coefs own.basis[[2]] <- Data2fd(1:nrow(x.gait[[2]]), x.gait[[2]], fbasis)$coefs own.cross.prod.mat <- diag(rep(1, 17)) set.seed(123) fmanova3 <- fmanova.ptbfr(group.label = group.label.gait, B = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat) summary(fmanova3) library(fda) fbasis <- create.bspline.basis(c(0, nrow(x.gait[[1]])), 20, norder = 4) own.basis <- vector("list", 2) own.basis[[1]] <- Data2fd(1:nrow(x.gait[[1]]), x.gait[[1]], fbasis)$coefs own.basis[[2]] <- Data2fd(1:nrow(x.gait[[2]]), x.gait[[2]], fbasis)$coefs own.cross.prod.mat <- inprod(fbasis, fbasis) set.seed(123) fmanova4 <- fmanova.ptbfr(group.label = group.label.gait, B = 1000, basis = "own", own.basis = own.basis, own.cross.prod.mat = own.cross.prod.mat) summary(fmanova4)
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
defined over the interval
, where
is a set of
-dimensional stochastic processes with mean vector
,
and covariance function
,
. Let
. In the multivariate analysis of variance problem for functional data (FMANOVA), we have to test the null hypothesis as follows:
The alternative is the negation of the null hypothesis. We assume that each functional observation is observed on a common grid of design time points equally spaced in
(see Section 3.1 of the vignette file,
vignette("fdANOVA", package = "fdANOVA")
).
fmanova.trp(x, group.label, k = 30, projection = c("GAUSS", "BM"), permutation = FALSE, B = 1000, independent.projection.tests = TRUE, parallel = FALSE, nslaves = NULL)
fmanova.trp(x, group.label, k = 30, projection = c("GAUSS", "BM"), permutation = FALSE, B = 1000, independent.projection.tests = TRUE, parallel = FALSE, nslaves = NULL)
x |
a list of |
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 |
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
# 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)
# 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)
The p-values of the tests based on random projections for the one-way analysis of variance for (univariate) functional data against the number of projections are plotted.
## S3 method for class 'fanovatests' plot(x, y, ...)
## S3 method for class 'fanovatests' plot(x, y, ...)
x |
an " |
y |
an " |
... |
additional arguments not used. |
We can use only one of the arguments x
and y
, or both simultaneously.
Tomasz Gorecki, Lukasz Smaga
# Some of the examples may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) set.seed(123) fanova4 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), B.TRP = 1000))) set.seed(123) fanova5 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), permutation = TRUE, B.TRP = 1000))) plot(x = fanova4) plot(y = fanova5) plot(x = fanova4, y = fanova5) set.seed(123) fanova6 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", B.TRP = 1000))) set.seed(123) fanova7 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", permutation = TRUE, B.TRP = 1000))) plot(x = fanova6) plot(y = fanova7) plot(x = fanova6, y = fanova7)
# Some of the examples may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) set.seed(123) fanova4 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), B.TRP = 1000))) set.seed(123) fanova5 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), permutation = TRUE, B.TRP = 1000))) plot(x = fanova4) plot(y = fanova5) plot(x = fanova4, y = fanova5) set.seed(123) fanova6 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", B.TRP = 1000))) set.seed(123) fanova7 <- fanova.tests(x.gait, group.label.gait, test = "TRP", parallel = TRUE, nslaves = 2, params = list(paramTRP = list(k = c(10, 20, 30), projection = "BM", permutation = TRUE, B.TRP = 1000))) plot(x = fanova6) plot(y = fanova7) plot(x = fanova6, y = fanova7)
The p-values of the tests based on random projections for multivariate analysis of variance for functional data against the number of projections are plotted.
## S3 method for class 'fmanovatrp' plot(x, y, withoutRoy = FALSE, ...)
## S3 method for class 'fmanovatrp' plot(x, y, withoutRoy = FALSE, ...)
x |
an " |
y |
an " |
withoutRoy |
a logical indicating whether to plot the p-values of the Rp test. |
... |
additional arguments not used. |
We can use only one of the arguments x
and y
, or both simultaneously.
Tomasz Gorecki, Lukasz Smaga
# 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)) fmanova2 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20), permutation = TRUE, B = 1000, parallel = TRUE, nslaves = 2) plot(x = fmanova1) plot(x = fmanova1, withoutRoy = TRUE) plot(y = fmanova2) plot(x = fmanova1, y = fmanova2) plot(x = fmanova1, y = fmanova2, withoutRoy = TRUE) # 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") 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) plot(x = fmanova3) plot(x = fmanova3, withoutRoy = TRUE) plot(y = fmanova4) plot(x = fmanova3, y = fmanova4) plot(x = fmanova3, y = fmanova4, withoutRoy = TRUE)
# 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)) fmanova2 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20), permutation = TRUE, B = 1000, parallel = TRUE, nslaves = 2) plot(x = fmanova1) plot(x = fmanova1, withoutRoy = TRUE) plot(y = fmanova2) plot(x = fmanova1, y = fmanova2) plot(x = fmanova1, y = fmanova2, withoutRoy = TRUE) # 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") 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) plot(x = fmanova3) plot(x = fmanova3, withoutRoy = TRUE) plot(y = fmanova4) plot(x = fmanova3, y = fmanova4) plot(x = fmanova3, y = fmanova4, withoutRoy = TRUE)
Univariate functional observations with or without indication of groups as well as mean functions of samples are plotted. We assume that univariate functional observations are observed on a common grid of
design time points equally spaced in
(see Section 3.1 of the vignette file,
vignette("fdANOVA", package = "fdANOVA")
).
plotFANOVA(x, group.label = NULL, int = NULL, separately = FALSE, means = FALSE, smooth = FALSE, ...)
plotFANOVA(x, group.label = NULL, int = NULL, separately = FALSE, means = FALSE, smooth = FALSE, ...)
x |
a |
group.label |
a character vector containing group labels. Its default value means that all functional observations are drawn without division into groups. |
int |
a vector of two elements representing the interval |
separately |
a logical indicating how groups are drawn. If |
means |
a logical indicating whether to plot only group mean functions. |
smooth |
a logical indicating whether to plot reconstructed data via smoothing splines instead of raw data. |
... |
additional arguments not used. |
Tomasz Gorecki, Lukasz Smaga
fanova.tests
, fmanova.ptbfr
, fmanova.trp
# 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) plotFANOVA(x = x.gait[[1]], int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE) plotFANOVA(x = x.gait[[1]], int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[2]], int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE) plotFANOVA(x = x.gait[[2]], int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE, smooth = TRUE) # Canadian Weather data (both features) library(fda) x.CW <- vector("list", 2) x.CW[[1]] <- CanadianWeather$dailyAv[,,1] x.CW[[2]] <- CanadianWeather$dailyAv[,,2] # vector of group labels group.label.CW <- rep(c("Eastern", "Western", "Northern"), c(15, 15, 5)) plotFANOVA(x = x.CW[[1]]) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW)) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means = TRUE) plotFANOVA(x = x.CW[[1]], smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[2]]) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW)) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means = TRUE) plotFANOVA(x = x.CW[[2]], smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means = TRUE, smooth = TRUE)
# 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) plotFANOVA(x = x.gait[[1]], int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE) plotFANOVA(x = x.gait[[1]], int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[2]], int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975)) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE) plotFANOVA(x = x.gait[[2]], int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025, 0.975), means = TRUE, smooth = TRUE) # Canadian Weather data (both features) library(fda) x.CW <- vector("list", 2) x.CW[[1]] <- CanadianWeather$dailyAv[,,1] x.CW[[2]] <- CanadianWeather$dailyAv[,,2] # vector of group labels group.label.CW <- rep(c("Eastern", "Western", "Northern"), c(15, 15, 5)) plotFANOVA(x = x.CW[[1]]) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW)) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means = TRUE) plotFANOVA(x = x.CW[[1]], smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[2]]) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW)) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means = TRUE) plotFANOVA(x = x.CW[[2]], smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately = TRUE, smooth = TRUE) plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means = TRUE, smooth = TRUE)
Prints the brief summary of the FANOVA tests.
## S3 method for class 'fanovatests' print(x, ...)
## S3 method for class 'fanovatests' print(x, ...)
x |
an " |
... |
additional arguments not used. |
The function prints out the values of test statistics and p-values of the FANOVA tests performed by the fanova.tests
function.
Tomasz Gorecki, Lukasz Smaga
fanova.tests
, summary.fanovatests
# This example may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) fanova1 <- fanova.tests(x.gait, group.label.gait) print(fanova1)
# This example may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) fanova1 <- fanova.tests(x.gait, group.label.gait) print(fanova1)
Prints the brief summary of the permutation tests based on a basis function representation for multivariate analysis of variance for functional data, i.e., the W, LH, P and R tests.
## S3 method for class 'fmanovaptbfr' print(x, ...)
## S3 method for class 'fmanovaptbfr' print(x, ...)
x |
an " |
... |
additional arguments not used. |
The function prints out the values of test statistics and p-values of the permutation tests based on a basis function representation for FMANOVA problem performed by the fmanova.ptbfr
function.
Tomasz Gorecki, Lukasz Smaga
fmanova.ptbfr
, summary.fmanovaptbfr
# 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 a basis function representation with default parameters set.seed(123) fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait) print(fmanova1)
# 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 a basis function representation with default parameters set.seed(123) fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait) print(fmanova1)
Prints the brief summary of the testing procedures based on random projections for multivariate analysis of variance for functional data, i.e., the Wp, LHp, Pp and Rp tests.
## S3 method for class 'fmanovatrp' print(x, ...)
## S3 method for class 'fmanovatrp' print(x, ...)
x |
an " |
... |
additional arguments not used. |
The function prints out the p-values of the tests based on random projections for FMANOVA problem performed by the fmanova.trp
function.
Tomasz Gorecki, Lukasz Smaga
fmanova.trp
, summary.fmanovatrp
# 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)) print(fmanova1)
# 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)) print(fmanova1)
Prints the summary of the FANOVA tests.
## S3 method for class 'fanovatests' summary(object, ...)
## S3 method for class 'fanovatests' summary(object, ...)
object |
an " |
... |
additional arguments not used. |
The function prints out the information about the data, the values of test statistics, the p-values and used parameters for the FANOVA tests performed by the fanova.tests
function.
Tomasz Gorecki, Lukasz Smaga
fanova.tests
, print.fanovatests
# This example may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) fanova1 <- fanova.tests(x.gait, group.label.gait) summary(fanova1)
# This example may run some time. # gait data (the first feature) library(fda) gait.data.frame <- as.data.frame(gait) x.gait <- as.matrix(gait.data.frame[, 1:39]) # vector of group labels group.label.gait <- rep(1:3, each = 13) # all FANOVA tests with default parameters set.seed(123) fanova1 <- fanova.tests(x.gait, group.label.gait) summary(fanova1)
Prints the summary of the permutation tests based on a basis function representation for multivariate analysis of variance for functional data, i.e., the W, LH, P and R tests.
## S3 method for class 'fmanovaptbfr' summary(object, ...)
## S3 method for class 'fmanovaptbfr' summary(object, ...)
object |
an " |
... |
additional arguments not used. |
The function prints out the information about the data, the values of test statistics, the p-values and used parameters for the permutation tests based on a basis function representation for FMANOVA problem performed by the fmanova.ptbfr
function.
Tomasz Gorecki, Lukasz Smaga
fmanova.ptbfr
, print.fmanovaptbfr
# 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 a basis function representation with default parameters set.seed(123) fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait) summary(fmanova1)
# 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 a basis function representation with default parameters set.seed(123) fmanova1 <- fmanova.ptbfr(x.gait, group.label.gait) summary(fmanova1)
Prints the summary of the testing procedures based on random projections for multivariate analysis of variance for functional data, i.e., the Wp, LHp, Pp and Rp tests.
## S3 method for class 'fmanovatrp' summary(object, ...)
## S3 method for class 'fmanovatrp' summary(object, ...)
object |
an " |
... |
additional arguments not used. |
The function prints out the information about the data, the p-values and used parameters for the tests based on random projections for FMANOVA problem performed by the fmanova.trp
function.
Tomasz Gorecki, Lukasz Smaga
# 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)
# 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)