#simulate some data sets: matrices of log-abundance levels
nsam<-5 #number of individuals
nfeat<-6 #number of features (metabolites, genes,...)
diffs<-c(1,4) #features with differential log-abundance levels
lfc<-5 #differential quantity
# create data sets:
x <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #case
y <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #control
x[diffs,] <- x[diffs,] + lfc
# Examples:
z1 <- nQ1.est(x=x,mu0=0.1,c=0.4)
z2 <- nQ2.est(x=x,y=y,a=0.4,b=0.02)
z3 <- nlocfdr.x(x=x,y=y)
z4 <- nIC.est(x=x,opt="BF")
z5 <- nscottberger.est(x=x)
z6 <- other.est (x=x,y=y,opt="pseudo")
z7 <- nhard.threshold.est(x=x,y=y,alpha=1,opt="fc")
Run the code above in your browser using DataLab