## toy data (non-compositional)
require(MASS)
x1 <- mvrnorm(20,c(0,0,0),diag(3))
x2 <- mvrnorm(30,c(3,0,0),diag(3))
x3 <- mvrnorm(40,c(0,3,0),diag(3))
X <- rbind(x1,x2,x3)
grp=c(rep(1,20),rep(2,30),rep(3,40))
#par(mfrow=c(1,2))
d1 <- daFisher(X,grp=grp,method="classical",coda=FALSE)
d2 <- daFisher(X,grp=grp,method="robust",coda=FALSE)
d2
summary(d2)
predict(d2)
## example with olive data:
## Not run:
# data(olives, package = "classifly")
# # exclude zeros (alternatively impute them if
# # the detection limit is known using impRZilr())
# ind <- which(olives==0, arr.ind = TRUE)[,1]
# olives <- olives[-ind, ]
# x <- olives[, 4:10]
# grp <- olives$Region # 3 groups
# res <- daFisher(x,grp)
# res
# summary(res)
# predict(res)
# res <- daFisher(x, grp, plotScore = TRUE)
# res <- daFisher(x, grp, method = "robust")
# res
# summary(res)
# predict(res)
# res <- daFisher(x,grp, plotScore = TRUE, method = "robust")
#
# # 9 regions
# grp <- olives$Area
# res <- daFisher(x, grp, plotScore = TRUE)
# res
# summary(res)
# predict(res)
# ## End(Not run)
Run the code above in your browser using DataLab