randtestEqRSintra: Permutation test for the second type of diversity...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/randtestEqRSintra.R

Description

Permutation test for the second type of diversity decomposition (EqRSintra).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
randtestEqRSintra(
  df,
  dis = NULL,
  structures = NULL,
  formula = c("QE", "EDI"),
  option = c("normed1", "normed2", "eq"),
  level = 1,
  nrep = 99,
  alter = c("greater", "less", "two-sided"),
  tol = 1e-08,
  metmean = c("harmonic", "arithmetic")
)

Arguments

df

Dataframe or matrix with sites as rows and species as columns. Entries are abundances of species within sites.

dis

Dissimilarity among species (NULL or class 'dist').

structures

Data frame that contains the name of the group (row) of an level (column) to which the site belongs. Sites in structures should be in the same order as in df. Default is NULL.

formula

Quadratic entropy formula ("QE", "EDI"). "QE" is default.

option

Rescaling type ("eq", "normed1" or "normed2").

level

Level to test. Provide a number between 1 and 1+the number of columns in structures. The number is discarded if the parameter 'structures' is set to NULL.

nrep

The number of permutations.

alter

Alternative hypothesis type ("greater" (default), "less" or "two-sided").

tol

A tolerance threshold (a value less than tol is considered equal to zero).

metmean

Mean type - "arithmetic" or "harmonic" (default).

Value

A list of class 'randtest', see randtest.

Author(s)

Sandrine Pavoine, Eric Marcon, Carlo Ricotta.

References

Pavoine, S., Marcon, E. and Ricotta, C. (2016), ‘Equivalent numbers’ for species, phylogenetic or functional diversity in a nested hierarchy of multiple scales. Methods Ecol Evol, 7: 1152–1163. DOI:10.1111/2041-210X.12591

See Also

EqRSintra, randtest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
data(macroloire)
# Taxonomic dissimilarities among species:
dTaxo <- dist.taxo(macroloire$taxo)^2/2
dTaxo <- dTaxo/max(dTaxo)
# Size-based dissimilarities among species
dSize <- dist.prop(macroloire$traits[ ,1:4], method = 2)
# Dissimilarities among species in terms of feeding categories
dFeed <- dist.prop(macroloire$traits[ ,5:11], method = 2)
# Dissimilarities among species in terms of both size and feeding categories
dSF <- (dSize+dFeed)/2

# Table with sites as rows (stations), species as columns and abundances as entries
ab <- as.data.frame(t(macroloire$fau))
# Table with sites as rows and one column only. Entries indicate the geological region associated with each site
stru <- macroloire$envir["Morphoregion"]

# Tests for dissimilarities among sites within regions:
rsbi1_GS <- randtestEqRSintra(ab, , stru, option="normed2", level=1, nrep=999)
rsbi1_GS
plot(rsbi1_GS)
rsbi1_Taxo <- randtestEqRSintra(ab, dTaxo, stru, option="normed2", formula = "QE", level=1, nrep=999)
rsbi1_Taxo
plot(rsbi1_Taxo)
rsbi1_Size <- randtestEqRSintra(ab, dSize, stru, option="normed2", formula = "QE", level=1, nrep=999)
rsbi1_Size
plot(rsbi1_Size)
rsbi1_Feed <- randtestEqRSintra(ab, dFeed, stru, option="normed2", formula = "QE", level=1, nrep=999)
rsbi1_Feed
plot(rsbi1_Feed)
rsbi1_SF <- randtestEqRSintra(ab, dSF, stru, option="normed2", formula = "QE", level=1, nrep=999)
rsbi1_SF
plot(rsbi1_SF)

vmikk/phylonest documentation built on Nov. 20, 2019, 4:17 p.m.