Description Usage Arguments Details Value Examples
View source: R/ScriptHomemadeFunctions.R
This function performs a sensitivity analysis to choose the combination of species to keep in an ecological dataset to optimize the
stress in NMDS analyses. This function works with the rar.rm_V2
function.As a consequence, sensiNMDS() performs a
NMDS for each possible combination of species removal in terms of abundance (of a species in a given site) and number of colonized sites (by that species),
as in rar.rm_V2
.
1 | sensiNMDS(MYDATA, TREATMENT, NB_DIM)
|
MYDATA |
A contingency table (a purely numeric species-site matrix). |
TREATMENT |
A factor with a length matching the number of samples (i.e. the number of lines of MYDATA). Typically, a factor representing a given treatment associated to the different samples/sites. In fact, this argument is not used in the current version of the function, but is required because it is called by hidden and inactive parts of the source code (useful for simulation studies). If you do not have such a factor, you can easily generate one (see Example section below). |
NB_DIM |
The desired number of dimensions kept in the NMDS analyses (>1). Usually, 2 or 3. The number of dimensions kept depends on the quality of the data. |
For time-efficiency reasons, the functions currently only tests for a predefined limited number of combinations of possible abundances (i.e.
accounted for by the ABUN argument in the rar.rm_V2
function) with a maximal value set to 40 (i.e. a species
has to be observed 40 times to be kept). For additional values, please contact me.
The NMDSs are performed using the metaMDS
function in the vegan package.
A graph showing the behaviour of NMDSs' stress for each combination of species removal.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.