rdb: Robust Differential Abundance Test

View source: R/rdb.R

rdbR Documentation

Robust Differential Abundance Test

Description

rdb is used to conduct robust differential abundance analysis for compositional data

Usage

rdb(P, Z, X = NULL, alpha = 0.1, fdr = FALSE)

Arguments

P

A numerical matrix for compositional data, each row represents a sample (the sum should be 1) and each column represents a component.

Z

A binary vector, 1 means treated group and 0 means control group.

X

A numerical matrix for observed covariates, each row represents a sample and each column represents a covariates.

alpha

A numerical value, indicating the significance level of FWER or FDR.

fdr

A boolean value, indicating if FDR is the measure of type I error. TRUE means FDR is used and FALSE means FWER is used.

Details

This function returns an indicator vector, where each entry correponds to each component of compoositional data.

Value

an indicator vector, where each entry correponds to each column of P. TRUE means it is differential component.

Author(s)

Shulei Wang

Examples

m=50
d=100 
P=matrix(runif(m*d),nrow=m,ncol=d)
Z=rep(0,m)
Z[1:(m/2)]=1
rdb(P,Z)


lakerwsl/RDB documentation built on Nov. 21, 2023, 5:47 p.m.