# riem.fanova: Fréchet Analysis of Variance In Riemann: Learning with Data on Riemannian Manifolds

## Description

Given sets of manifold-valued data X^{(1)}_{1:{n_1}}, X^{(2)}_{1:{n_2}}, …, X^{(m)}_{1:{n_m}}, performs analysis of variance to test equality of distributions. This means, small p-value implies that at least one of the equalities does not hold.

## Usage

 ```1 2 3``` ```riem.fanova(..., maxiter = 50, eps = 1e-05) riem.fanovaP(..., maxiter = 50, eps = 1e-05, nperm = 99) ```

## Arguments

 `...` S3 objects of `riemdata` class for manifold-valued data. `maxiter` maximum number of iterations to be run. `eps` tolerance level for stopping criterion. `nperm` the number of permutations for resampling-based test.

## Value

a (list) object of `S3` class `htest` containing:

statistic

a test statistic.

p.value

p-value under H_0.

alternative

alternative hypothesis.

method

name of the test.

data.name

name(s) of provided sample data.

## References

\insertRef

dubey_frechet_2019Riemann

## Examples

 ``` 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 30 31 32 33 34``` ```#------------------------------------------------------------------- # Example on Sphere : Uniform Samples # # Each of 4 classes consists of 20 uniform samples from uniform # density on 2-dimensional sphere S^2 in R^3. #------------------------------------------------------------------- ## PREPARE DATA OF 4 CLASSES ndata = 200 class1 = list() class2 = list() class3 = list() class4 = list() for (i in 1:ndata){ tmpxy = matrix(rnorm(4*2, sd=0.1), ncol=2) tmpz = rep(1,4) tmp3d = cbind(tmpxy, tmpz) tmp = tmp3d/sqrt(rowSums(tmp3d^2)) class1[[i]] = tmp[1,] class2[[i]] = tmp[2,] class3[[i]] = tmp[3,] class4[[i]] = tmp[4,] } obj1 = wrap.sphere(class1) obj2 = wrap.sphere(class2) obj3 = wrap.sphere(class3) obj4 = wrap.sphere(class4) ## RUN THE ASYMPTOTIC TEST riem.fanova(obj1, obj2, obj3, obj4) ## RUN THE PERMUTATION TEST WITH MANY PERMUTATIONS riem.fanovaP(obj1, obj2, obj3, obj4, nperm=999) ```

Riemann documentation built on June 20, 2021, 5:07 p.m.