# NOT RUN {
##1.muiltivariate normal distribution with only mean difference:
##generate data, n1=n2=10, dimension 25
X1<-matrix(rnorm(250,mean=0,sd=1),10,25)
X2<-matrix(rnorm(250,mean=0.5,sd=1),10,25)
y<-c(rep(1,10),rep(2,10))
X<-rbind(X1,X2)
##GLP test:
locdiff.test<-GLP(X,y,m.max=4)
# }
# NOT RUN {
##2.Leukemia data example
data(leukemia)
attach(leukemia)
leukemia.test<-GLP(X,class,components=1:4)
##confirmatory results:
leukemia.test$GLP # overall statistic
#[1] 0.2092378
leukemia.test$pval # overall p-value
#[1] 0.0001038647
##exploratory outputs:
leukemia.test$table # rows as shown in Table 3 of reference
# component comp.GLP pvalue
#[1,] 1 0.209237826 0.0001038647
#[2,] 2 0.022145514 0.2066876581
#[3,] 3 0.002025545 0.7025436476
#[4,] 4 0.033361702 0.1211769396
# }
Run the code above in your browser using DataLab