testfordiff.ind.pval: Test for a difference between two independent samples of...

Description Usage Arguments Value References Examples

Description

Test for a difference between two independent samples of compositional data. Zeros of any type are allowed.

Usage

1
testfordiff.ind.pval(compdata.1, compdata.2, ns1, R = 500)

Arguments

compdata.1

sample of compositional data.

compdata.2

sample of compositional data.

ns1

sample size of compdata.1.

R

number of bootstrap samples, default is 500.

Value

p-value obtained through a multivariate permutation test with test statistic based on chi-square distances.

References

Stewart, C., Iverson, S. and Field, C. (2014) Testing for a change in diet using fatty acid signatures. Environmental and Ecological Statistics 21, pp. 775-792.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Prey
data(preyFAs)

## Capelin FA sig
capelin.sig=preyFAs[preyFAs$Species=="capelin",4:(ncol(preyFAs))]
capelin.sig=capelin.sig/apply(capelin.sig,1,sum)

## Sandlance FA sig
sandlance.sig=preyFAs[preyFAs$Species=="sandlance",4:(ncol(preyFAs))]
sandlance.sig=sandlance.sig/apply(sandlance.sig,1,sum)

# Note: uncomment examples to run. CRAN tests fail because execution time > 5 seconds
# testfordiff.ind.pval(as.matrix(capelin.sig),
#                      as.matrix(sandlance.sig),
#                      nrow(capelin.sig))

QFASA documentation built on June 15, 2019, 1:03 a.m.