
Last chance! 50% off unlimited learning
Sale ends in
Given the data on Grassmann manifold
grassmann.utest(grobj, method = c("Bing", "BingM"))
a S3 "riemdata"
class of Grassmann-valued data.
(case-insensitive) name of the test method containing
"Bing"
Bingham statistic.
"BingM"
modified Bingham statistic with better order of error.
a (list) object of S3
class htest
containing:
a test statistic.
alternative hypothesis.
name of the test.
name(s) of provided sample data.
chikuse_statistics_2003Riemann
mardia_directional_1999Riemann
# NOT RUN {
#-------------------------------------------------------------------
# Compare Bingham's original and modified versions of the test
#
# Test 1. sample uniformly from Gr(2,4)
# Test 2. use perturbed principal components from 'iris' data in R^4
# which is concentrated around a point to reject H0.
#-------------------------------------------------------------------
## Data Generation
# 1. uniform data
myobj1 = grassmann.runif(n=100, k=2, p=4)
# 2. perturbed principal components
data(iris)
irdat = list()
for (n in 1:100){
tmpdata = iris[1:50,1:4] + matrix(rnorm(50*4,sd=0.5),ncol=4)
irdat[[n]] = eigen(cov(tmpdata))$vectors[,1:2]
}
myobj2 = wrap.grassmann(irdat)
## Test 1 : uniform data
grassmann.utest(myobj1, method="Bing")
grassmann.utest(myobj1, method="BingM")
## Tests : iris data
grassmann.utest(myobj2, method="bINg") # method names are
grassmann.utest(myobj2, method="BiNgM") # CASE - INSENSITIVE !
# }
Run the code above in your browser using DataLab