frank.fanova: Rank envelope F-test

Description Usage Arguments Details References See Also Examples

View source: R/graphfanova.r

Description

A one-way functional ANOVA based on the rank envelope applied to F values

Usage

1
2
3
4
5
6
7
8
9
frank.fanova(
  nsim,
  curve_set,
  groups,
  variances = "equal",
  test.equality = c("mean", "var", "cov"),
  cov.lag = 1,
  ...
)

Arguments

nsim

The number of random permutations.

curve_set

The original data (an array of functions) provided as a curve_set object (see create_curve_set) or a fdata object (see fdata). The curve set should include the argument values for the functions in the component r, and the observed functions in the component obs.

groups

The original groups (a factor vector representing the assignment to groups).

variances

Either "equal" or "unequal". If "equal", then the traditional F-values are used. If "unequal", then the corrected F-values are used. The current implementation uses lm to get the corrected F-values.

test.equality

A character with possible values mean (default), var and cov. If mean, the functional ANOVA is performed to compare the means in the groups. If var, then the equality of variances of the curves in the groups is tested by performing the graphical functional ANOVA test on the functions

Z_{ij}(r) = T_{ij}(r) - \bar{T}_j(r).

If cov, then the equality of lag cov.lag covariance is tested by performing the fANOVA with

|V_{ij}(r)| sign(V_{ij}(r)),

where

V_{ij}(r) = (T_{ij}(r) - \bar{T}_j(r))((T_{ij}(r+s) - \bar{T}_j(r+s))).

See Mrkvicka et al. (2020) for more details.

cov.lag

The lag of the covariance for testing the equality of covariances, see test.equality.

...

Additional parameters to be passed to global_envelope_test.

Details

The test assumes that there are J groups which contain n1, ..., nJ functions T_{ij}, i=1,...,J, j=1,...,nj. The functions should be given in the argument x, and the groups in the argument groups. The test assumes that there exists non random functions μ(r) and μ_i(r) such that

T_{ij}(r) =μ(r) + μ_i(r) + e_{ij}(r), i=1, ..., J, j=1, ..., nj

where e_{ij}(r) are independent and normally distributed. The test vector is

T = (F(r_1), F(r_2), … , F(r_K)),

where F(r_i) stands for the F-statistic. The simulations are performed by permuting the test functions. Further details can be found in Mrkvička et al. (2020).

The argument variances="equal" means that equal variances across groups are assumed. The correction for unequal variances can be done by using the corrected F-statistic (option variances="unequal").

Unfortunately this test is not able to detect which groups are different from each other.

References

Mrkvička, T., Myllymäki, M., Jilek, M. and Hahn, U. (2020) A one-way ANOVA test for functional data with graphical interpretation. Kybernetika 56 (3), 432-458. doi: 10.14736/kyb-2020-3-0432

See Also

graph.fanova

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("rimov")
groups <- factor(c(rep(1, times=12), rep(2, times=12), rep(3, times=12)))
res <- frank.fanova(nsim = 2499, curve_set = rimov, groups = groups)

plot(res)

data("imageset3")
res2 <- frank.fanova(nsim = 19, # Increase nsim for serious analysis!
                     curve_set = imageset3$image_set,
                     groups = imageset3$Group)
plot(res2)
plot(res2, fixedscales=FALSE)

GET documentation built on March 21, 2021, 9:06 a.m.