Obs3D: Empirical diversity q profile

Description Usage Arguments Value Examples

Description

obs3D The empirical diversity of order q

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
obs3D(
  data,
  diversity = "TD",
  q = seq(0, 2, 0.2),
  datatype = "abundance",
  nboot = 50,
  conf = 0.95,
  nT,
  PDtree,
  PDreftime = NULL,
  PDtype = "meanPD",
  FDdistM,
  FDtype = "AUC",
  FDtau = NULL
)

Arguments

data

(a) For datatype = "abundance", data can be input as a vector of species abundances (for a single assemblage), matrix/data.frame (species by assemblages), or a list of species abundance vectors.
(b) For datatype = "incidence_freq", data can be input as a vector of incidence frequencies (for a single assemblage), matrix/data.frame (species by assemblages), or a list of incidence frequencies; the first entry in all types of input must be the number of sampling units in each assemblage.
(c) For datatype = "incidence_raw", data can be input as a list of matrix/data.frame (species by sampling units); data can also be input as a matrix/data.frame by merging all sampling units across assemblages based on species identity; in this case, the number of sampling units (nT, see below) must be input.

diversity

selection of diversity type: 'TD' = Taxonomic diversity, 'PD' = Phylogenetic diversity, and 'FD' = Functional diversity.

q

a numerical vector specifying the diversity orders. Default is seq(0, 2, by = 0.2).

datatype

data type of input data: individual-based abundance data (datatype = "abundance"), sampling-unit-based incidence frequencies data (datatype = "incidence_freq"), or species by sampling-units incidence matrix (datatype = "incidence_raw") with all entries being 0 (non-detection) or 1 (detection)

nboot

a positive integer specifying the number of bootstrap replications when assessing sampling uncertainty and constructing confidence intervals. Enter 0 to skip the bootstrap procedures. Default is 50.

conf

a positive number < 1 specifying the level of confidence interval. Default is 0.95.

nT

(required only when datatype = "incidence_raw" and input data is matrix/data.frame) a vector of nonnegative integers specifying the number of sampling units in each assemblage. If assemblage names are not specified, then assemblages are automatically named as "assemblage1", "assemblage2",..., etc.

PDtree

(required only when diversity = "PD"), a phylogenetic tree in Newick format for all observed species in the pooled assemblage.

PDreftime

(required only when diversity = "PD"), a vector of numerical values specifying reference times for PD. Default is NULL (i.e., the age of the root of PDtree).

PDtype

(required only when diversity = "PD"), select PD type: PDtype = "PD" (effective total branch length) or PDtype = "meanPD" (effective number of equally divergent lineages). Default is "meanPD", where meanPD = PD/tree depth.

FDdistM

(required only when diversity = "FD"), a species pairwise distance matrix for all species in the pooled assemblage.

FDtype

(required only when diversity = "FD"), select FD type: FDtype = "tau_values" for FD under specified threshold values, or FDtype = "AUC" (area under the curve of tau-profile) for an overall FD which integrates all threshold values between zero and one. Default is "AUC".

FDtau

(required only when diversity = "FD" and FDtype = "tau_values"), a numerical vector between 0 and 1 specifying tau values (threshold levels). If NULL (default), then threshold is set to be the mean distance between any two individuals randomly selected from the pooled assemblage (i.e., quadratic entropy).

Value

a table of diversity q profile by 'Empirical'

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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## example for abundance-based data
# diversity = 'TD'
data(spider)
out1 <- obs3D(spider, diversity = 'TD', datatype = "abundance")
out1

# diversity = 'PD'
data(data.abu)
data <- data.abu$data
tree <- data.abu$tree
out2 <- obs3D(data, diversity = 'PD', q = seq(0, 2, by = 0.25), datatype = "abundance", nboot = 30, PDtree = tree)
out2

# diversity = 'FD' & FDtype = 'tau_values'
data(FunDdata.abu)
data <- FunDdata.abu$data
distM <-  FunDdata.abu$dij
out3 <- obs3D(data, diversity = 'FD', q = seq(0, 2, 0.5), datatype = "abundance", nboot = 30, FDdistM = distM, FDtype = 'tau_values')
out3

# diversity = 'FD' & FDtype = 'AUC'
data(FunDdata.abu)
data <- FunDdata.abu$data
distM <-  FunDdata.abu$dij
out4 <- obs3D(data = data[,2], diversity = 'FD', q = seq(0, 2, 0.5), datatype = "abundance", nboot = 30, FDdistM = distM)
out4

## example for incidence-based data
# diversity = 'TD'
data(ant)
out5 <- obs3D(ant, diversity = 'TD', datatype = "incidence_freq")
out5

# diversity = 'PD'
data(data.inc)
data <- data.inc$data
tree <- data.inc$tree
nT <- data.inc$nT
out6 <- obs3D(data, diversity = 'PD', q = seq(0, 2, by = 0.25), datatype = "incidence_raw", nT = nT, PDtree = tree)
out6

# diversity = 'FD' & FDtype = 'tau_values'
data(FunDdata.inc)
data <- FunDdata.inc$data
distM <-  FunDdata.inc$dij
out7 <- obs3D(data, diversity = 'FD', datatype = "incidence_freq", FDdistM = distM, FDtype = 'tau_values')
out7

# diversity = 'FD' & FDtype = 'AUC'
data(FunDdata.inc)
data <- FunDdata.inc$data
distM <-  FunDdata.inc$dij
out8 <- obs3D(data, diversity = 'FD', datatype = "incidence_freq", nboot = 30, FDdistM = distM)
out8

KaiHsiangHu/iNEXT3D documentation built on July 18, 2021, 8:11 p.m.