Description Usage Arguments Value References See Also Examples
First calls the function distTraitspace to calculate the distances between the predicted and true/observed relative abundances (by default) or species distributions if byrow = FALSE. Then runs permutation tests to test if these distances are statistically significant and provides p-values.
1 |
result |
the output from the traitspace function (class Traitspace) |
obs |
The observed matrix - where, each row corresponds to a site and each column to a species - the order of sites and species should match with the order in which they appear in the predicted matrix. By default, NULL, will generate the observed matrix using the supplied trait data using the trueP function. See the trueP function for details. |
byrow |
By default, TRUE, will compare the relative abundances. If FALSE, will compare the species distribution. |
permutations |
Number of permutations, by default 999. |
A list of distances calculated using the following measures: Euclidean, Manhatten, Hellinger, Kullback-Leibler and Bhattacharya. It calculates both the average distance (averages across all sites or species) as well as individual distances. Also provides p-values corresponding to each of these distances.
Basu, A., Shioya, H., & Park, C. (2011). Statistical inference: the minimum distance approach. CRC Press.
Phipson, B., & Smyth, G. K. (2010). Permutation p-values should never be zero: calculating exact P-values when permutations are randomly drawn. Statistical applications in genetics and molecular biology, 9(1).
distTraitspace
, Traitspace
, TraitspaceMod
1 2 3 4 5 6 7 |
Loading required package: permute
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Attaching package: 'Traitspace'
The following object is masked from 'package:permute':
check
** Warning **: the observed relative abundances/species distributions are calculated from the trait data!
This may not be the correct value. Please refer to the documentation for details!
$Pval
$Pval$EUC.dist
[1] 0.015
$Pval$MAN.dist
[1] 0.015
$Pval$H.dist
[1] 0.015
$Pval$KL.div.D1
[1] 0.015
$Pval$B.dist
[1] 0.015
$mean.dist
$mean.dist$EUC.dist
[1] 0.2871345
$mean.dist$MAN.dist
[1] 0.4394254
$mean.dist$H.dist
[1] 0.2081156
$mean.dist$KL.div.D1
[1] 0.2710183
$mean.dist$B.dist
[1] 0.04565618
$Pval_site
$Pval_site$EUC.dist
[1] 0.187 0.181 0.181 0.186 0.202
$Pval_site$MAN.dist
[1] 0.187 0.181 0.181 0.186 0.202
$Pval_site$H.dist
[1] 0.187 0.181 0.181 0.186 0.202
$Pval_site$KL.div.D1
[1] 0.187 0.181 0.181 0.186 0.202
$Pval_site$B.dist
[1] 0.187 0.181 0.181 0.186 0.202
$dist_site
$dist_site$EUC.dist
-3 -1.5 0 1.5 3
0.2511360 0.3871558 0.2423266 0.3363224 0.2187316
$dist_site$MAN.dist
-3 -1.5 0 1.5 3
0.3551600 0.6136381 0.4126487 0.5041800 0.3115000
$dist_site$H.dist
-3 -1.5 0 1.5 3
0.1873688 0.2761394 0.2291661 0.2207461 0.1271577
$dist_site$KL.div.D1
-3 -1.5 0 1.5 3
0.16874098 0.35714237 0.47227004 0.25776798 0.09917022
$dist_site$B.dist
-3 -1.5 0 1.5 3
0.03508827 0.07793313 0.05131214 0.04864502 0.01530235
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.