Test.Paired: Test Paired Data Sets

Description Usage Arguments Value Examples

View source: R/Test.Paired.R

Description

Tests two paired data sets for similarity.

Usage

1
Test.Paired(group.data, numPerms = 1000, parallel = FALSE, cores = 3)

Arguments

group.data

A list of 2 matrices of taxonomic counts(columns) for each sample(rows).

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'.

Value

A pvalue.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	data(saliva)
	data(throat)
	
	
	### Since saliva and throat come from same subjects, the data is paired 
	saliva1 <- saliva[-24,] # Make saliva 23 subjects to match throat
	group.data <- list(throat, saliva1)
	
	### We use 1 for speed, should be at least 1,000
	numPerms <- 1
	
	pval <- Test.Paired(group.data, numPerms)
	pval

Example output

Loading required package: dirmult

Attaching package: 'HMP'

The following object is masked from 'package:dirmult':

    weirMoM

[1] 0.5

HMP documentation built on Aug. 31, 2019, 5:05 p.m.