DAFOT (version 0.0.1)

SCalculation: The effctive number of tree calculation

Description

SCalculation is used to calculate the effctive number of tree.

Usage

SCalculation(sP, sQ, Tree, t)

Arguments

sP

a vector. The component-wise variance of 1st group

sQ

a vector. The component-wise variance of 2nd group

Tree

A phylo class. Phylogenetic tree

t

a numeric. The proportion of sample from 1st group.

Value

SCalculation returns a value for effctive number of tree.

Details

This function is used to calculate the effctive number of tree.

See Also

DAFOT

Examples

Run this code
# NOT RUN {
library(ape)
Tree=rtree(100)
alphaP=c(rep(1,length(Tree$tip.label)),rep(0,Tree$Nnode))
alphaQ=c(rep(1,length(Tree$tip.label)),rep(0,Tree$Nnode))
DataPQ<-DataGenerating(100,100,alphaP,alphaQ,1000)
sdP=apply(DataPQ$P,1,sd)
sdQ=apply(DataPQ$Q,1,sd)
SCalculation(sdP,sdQ,Tree,100/(100+100))

##must install metagenomeFeatures from Bioconductor before trying this example
# }
# NOT RUN {
library(metagenomeFeatures)
gg85 <- get_gg13.8_85MgDb()
gamma_16S <- mgDb_select(gg85, type = "all", keys = "Gammaproteobacteria", keytype = "Class")
Tree=gamma_16S$tree
Tree$tip.label<-1:length(Tree$tip.label)
alphaP=c(rep(1,length(Tree$tip.label)),rep(1,Tree$Nnode))
alphaQ=c(rep(1,length(Tree$tip.label)),rep(1,Tree$Nnode))
alphaQ[1]=alphaQ[1]+1
DataPQ<-DataGenerating(100,100,alphaP,alphaQ,1000)
sdP=apply(DataPQ$P,1,sd)
sdQ=apply(DataPQ$Q,1,sd)
SCalculation(sdP,sdQ,Tree,100/(100+100))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab