pairedCompareTwoDataSets: Likelihood-Ratio-Test Statistics to Compare the Distribution...

Description Usage Arguments Details Value Author(s) Examples

View source: R/pairedCompareTwoDataSets.R

Description

This functions compares the distribution of two paired sets of RDP-based taxonomic trees using Likelihood-Ratio-Test statistics and a p-value is computed using permutation.

Usage

1
2
	pairedCompareTwoDataSets(data1, data2, numPerms = 1000, parallel = FALSE, 
		cores = 3, maxSteps=50, delta=10^(-6))

Arguments

data1, data2

Data frames in which each column contains the rdp read counts for every taxa given in the row names.

numPerms

Number of permutations. In practice this should be at least 1,000.

parallel

When this is 'TRUE' it allows for parallel calculation of the permutations. Requires the package doParallel.

cores

The number of parallel processes to run if parallel is 'TRUE'.

maxSteps

The maximum number of times to iterate though for the MLE.

delta

The minimum threshold of change in f to stop the search for the MLE.

Details

Note: Both data sets should be standardized to the same number of reads.

Value

A p-value for the similarity of the two data sets based on the permutation test.

Author(s)

Patricio S. La Rosa, Elena Deych, Berkley Shands, William D. Shannon

Examples

1
2
3
4
5
6
7
8
9
	data(saliva)
	data(stool)
	
	### We use 1 for the number of permutations for computation time
	### This value should be at least 1000 for an accurate result
	numPerms <- 1
	
	pval <- pairedCompareTwoDataSets(saliva, stool, numPerms)
	pval

HMPTrees documentation built on May 2, 2019, 4:02 p.m.