tpaired.krandtest {adespatial}R Documentation

Paired t-tests of differences between T1 and T2 for each species


This function computes paired t-tests for each species, for abundances observed at time 1 (T1) and time 2 (T2). The test is one-tailed in the direction of the sign (+ or -) of the t statistic.


tpaired.krandtest(mat1, mat2, nperm = 99, list.all = FALSE)



site-by-species data at time T1 (data.frame or matrix).


site-by-species data at time T2 (data.frame or matrix).


Number of permutations. Use 999, 9999, or more, to allow for correction of p-values for multiple tests.


If FALSE, the output matrix $t.tests only lists t.test results for species with t.stat not 0; If TRUE, the output matrix $t.tests lists t.test results for all species; when t.stat is 0, the p-values in the output table (p.param and p.perm) receive codes -999; Sign(T1-T2) receives the value 0.


The species that do not vary in either data set are discarded before calculation of the paired t-tests begins.

p-values should be corrected for multiple testing. Use function p.adjust of stats: p.adjust(res$t.test$p.param) or p.adjust(res$t.test$p.perm) Correction methods "holm" (default) and "hochberg" are fine for this type of analysis.



Pierre Legendre


Legendre, P. 2019. A temporal beta-diversity index to identify sites that have changed in exceptional ways in space-time surveys. Ecology and Evolution (in press).

van den Brink, P. J. & C. J. F. ter Braak. 1999. Principal response curves: analysis of time-dependent multivariate responses of biological community to stress. Environmental Toxicology and Chemistry 18: 138-148.

See Also



if(require("vegan", quietly = TRUE)) {

## Invertebrate communities subjected to insecticide treatment.

## As an example in their paper on Principal Response Curves (PRC), van den Brink & ter 
## Braak (1999) used observations on the abundances of 178 invertebrate species 
## (macroinvertebrates and zooplankton) subjected to treatments in 12 mesocosms by the 
## insecticide chlorpyrifos. The mesocosms were sampled at 11 occasions. The data, 
## available in the {vegan} package, are log-transformed species abundances, 
## y.tranformed = loge(10*y+1).

## The data of survey #4 will be compared to those of survey #11 in this example.  
## Survey #4 was carried out one week after the insecticide treatment, whereas the 
## fauna of the mesocosms was considered to have fully recovered from the treatment 
## at the time of survey #11.


## The mesocosms had originally been attributed at random to the treatments. However,  
## to facilitate presentation of the results, they will be listed here in order of 
## increased insecticide doses: {0, 0, 0, 0, 0.1, 0.1, 0.9, 0.9, 6, 6, 44, 44} 
## micro g/L.

survey4.order = c(38,39,41,47,37,44,40,46,43,48,42,45)

survey11.order = c(122,123,125,131,121,128,124,130,127,132,126,129)

## Paired t-tests of differences between survey.4 and survey.11 for the p species

res <- tpaired.krandtest(pyrifos[survey4.order,],pyrifos[survey11.order,])


[Package adespatial version 0.3-14 Index]