randtestEqRS: Permutation test for the first type of diversity...

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

View source: R/randtestEqRS.R

Description

Permutation test for the first type of diversity decomposition (EqRS).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
randtestEqRS(
  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
)

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).

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

EqRS, randtest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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"]

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