CalPrb: Calculate Likelihood based on Dirichlet-multinomial...

Description Usage Arguments Value Examples

View source: R/CalPrb.r

Description

This function estimates parameters from Dirichlet-multinomial distribution.

Usage

1
2
3
4
5
6
7
CalPrb(
  FS_out = FS_out,
  testSet = testSet,
  col_start = 3,
  type_col = 2,
  HighestRank = nrow(FS_out$Feature)
)

Arguments

FS_out

An object from the FeatureSelection()

testSet

A test set in data frame or matrix form. The colnames should have the same bacteria (features) as in the training set.

col_start

An index indicating at which column is the beginning of bacteria (features) data. The default is the 3rd column.

type_col

An index indicating at which column is group/type variable. The default is the 2nd column.

HighestRank

The top number of features inclueded in model. The default is all the features left after filtering.

Value

A data frame with 17 columns, each row represents a model estimation output.

Examples

1
2
3
4
5
6
7
8
data(training)

#### Take one row as testSet ####
idx <- sample(1:nrow(training),1)
test <- training[idx,]
train <- training[-idx,]

CalPrb(FS(train),test) # This may take up to one minute

qunfengdong/DMBC documentation built on April 22, 2020, 7:27 p.m.