n<-20
Y<-matrix(runif(3*n),ncol=3)
ipd<-ipd.mat(Y)
cls<-sample(1:2,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
ct<-nnct(ipd,cls)
ct
exact.nnct(ct)
fisher.test(ct)
exact.nnct(ct,alt="g")
fisher.test(ct,alt="g")
exact.nnct(ct,alt="l",pval.type = "mid")
#############
ct<-matrix(sample(10:20,9),ncol=3)
fisher.test(ct) #here exact.nnct(ct) gives error message, since number of classes > 2
Run the code above in your browser using DataLab