The package iNEXT.beta3D (iNterpolation and
EXTrapolation with beta diversity for three dimensions of biodiversity)
is a sequel to iNEXT. The three dimensions (3D) of
biodiversity include taxonomic diversity
(TD), phylogenetic diversity (PD) and
functional diversity (FD). This document
provides an introduction demonstrating how to run
iNEXT.beta3D. An online version iNEXT.beta3D Online
is also available for users without an R background.
A unified framework based on Hill numbers (for TD) and their
generalizations, Hill-Chao numbers (for PD and FD), is adopted in the
package. TD quantifies the effective number of species, meanPD (PD
divided by reference time) quantifies the effective number of lineages,
and FD quantifies the effective number of virtual functional groups (or
functional “species”). Thus, TD, meanPD, and FD are all expressed in
comparable units of species/lineage equivalents, allowing meaningful
comparisons across the three dimensions of biodiversity; see Chao et
al. (2021) for a review of the unified framework.
For each of the three dimensions, iNEXT.beta3D focuses on the
multiplicative decomposition of diversity (beta = gamma/alpha, expressed
in units of effective number of assemblages) for orders q = 0, 1 and 2,
based on sampling data. The resulting 3D beta diversity quantifies the
extent of among-assemblage differentiation, reflecting changes in
species, lineages, or functional-groups composition and their abundances
across assemblages.
iNEXT.beta3D provides standardized 3D estimates at a common sample
size (for alpha and gamma diversity only, because sample-size-based beta
diversity is not generally valid) or at a common sample coverage (for
alpha, beta and gamma diversity). iNEXT.beta3D also provides
standardized estimates for four classes of coverage-based dissimilarity
measures.
Based on rarefaction and extrapolation (R/E) theory for
Hill-numbers-based TD of orders q = 0, 1 and 2, Chao et al. (2023b)
developed the corresponding R/E theory for taxonomic beta diversity,
with applications to real-world spatial, temporal and spatio-temporal
data. An application to Gentry’s global forest data together with a
concise description of the theory, is provided in Chao et al. (2023a).
The extension to phylogenetic and functional beta diversity follows a
generally parallel framework. iNEXT.beta3D features two
types of R/E sampling curves:
Sample-size-based (or size-based) R/E sampling curves: These
curves plot standardized 3D gamma and
alpha diversity as functions of sample size.
Note that the size-based beta diversity is not generally a statistically
valid measure (Chao et al. 2023b); therefore, the corresponding beta
diversity sampling curve is not provided.
Sample-coverage-based (or coverage-based) R/E sampling curves:
These curves plot standardized 3D gamma,
alpha, and beta
diversity, as well as four classes of dissimilarity measures, as
functions of sample coverage, an objective measure of sample
completeness.
Note that sufficient data are required to run
iNEXT.beta3D. If a dataset contains only a few species,
along with their abundances, phylogenies, or traits, it may not contain
sufficient information for reliable iNEXT.beta3D
analyses.
HOW TO CITE iNEXT.beta3D
If you publish work based on results obtained from
iNEXT.beta3D, please cite at least one of the following
methodological papers (2023a, b) and also the iNEXT.beta3D
package:
Chao, A., Chiu, C.-H., Hu, K.-H., and Zelený, D. (2023a).
Revisiting Alwyn H. Gentry’s forest transect data: a statistical
sampling-model-based approach. Japanese Journal of Statistics and
Data Science, 6, 861-884. (https://doi.org/10.1007/s42081-023-00214-1)
Chao, A., Thorn, S., Chiu, C.-H., Moyes, F., Hu, K.-H., Chazdon,
R. L., Wu, J., Magnago, L. F. S., Dornelas, M., Zelený, D., Colwell, R.
K., and Magurran, A. E. (2023b). Rarefaction and extrapolation with beta
diversity under a framework of Hill numbers: the iNEXT.beta3D
standardization. Ecological Monographs e1588.(https://doi.org/10.1002/ecm.1588)
Chao, A., Lee, Y.-T., Lin, K.-L., and Chuang, P.-Y. (2026). The
iNEXT.beta3D package: interpolation and extrapolation with beta
diversity for three dimensions of biodiversity. R package version
1.1.0.
SOFTWARE NEEDED TO RUN iNEXT.beta3D IN R
HOW TO RUN iNEXT.beta3D:
The iNEXT.beta3D package is available from CRAN and can
be downloaded from Anne Chao’s GitHub iNEXT.beta3D_github
using the following commands. For a first-time installation, additional
visualization extension package (ggplot2 from CRAN) and
relevant package (iNEXT.3D from CRAN) must be installed and
loaded.
## install iNEXT.beta3D package from CRAN
install.packages("iNEXT.beta3D")
## install the latest version from GitHub
install.packages('devtools')
library(devtools)
install_github('AnneChao/iNEXT.beta3D')
## import packages
library(iNEXT.beta3D)
There are three main functions in this package:
iNEXTbeta3D(): Computes standardized 3D
estimates at common sample sizes (for gamma and alpha diversity) or
common sample coverage levels (for gamma, alpha, and beta diversity), as
well as four classes of coverage-based dissimilarity measures. Users can
obtain estimates at default or user-specified sample sizes or coverage
levels.
ggiNEXTbeta3D(): Visualizes the output from
iNEXTbeta3D().
DataInfobeta3D(): Provides basic information
about (1) the reference sample from each individual assemblage, (2) the
gamma reference sample from the pooled assemblage, and (3) the alpha
reference sample from the joint assemblage.
DATA INPUT FORMAT
To assess taxonomic, phylogenetic, and functional beta diversity
among assemblages, information on species identity (or a unique
identification code) and assemblage affiliation is required. For each
dataset, species should be arranged in rows, with species names (or
identification codes) used as row names. The columns represent
assemblages for abundance data or sampling units for incidence data, as
described below. Two types of species abundance/incidence data are
supported:
Individual-based abundance data
(datatype = "abundance"): The input data for a single
dataset with N assemblages should be arranged as a species-by-assemblage
abundance matrix/data.frame, with species in rows and
assemblages in columns. Species names (or unique identification codes)
should be used as row names, and assemblage names as column names. Users
can input multiple datasets collected from different localities,
regions, plots, time periods, or other sampling contexts. The input for
multiple datasets is a list of matrices/data.frames, with each element
representing one dataset. Different datasets may contain different
numbers of assemblages. For each dataset, iNEXTbeta3D()
computes gamma, alpha, and beta diversity, as well as dissimilarity
among all N assemblages and other relevant statistics. Users can also
set by_pair = TRUE to obtain the corresponding results for
every pair of assemblages.
Sampling-unit-based incidence raw data
(datatype = "incidence_raw"): For a dataset with N
assemblages, the input data consist of a list of N matrices/data.frames,
with each matrix representing a species-by-sampling-unit incidence
matrix for one assemblage. Species are arranged in rows and sampling
units in columns. Each entry must be either 0 (non-detection) or 1
(detection). Users can input multiple datasets, with each dataset
represented by a list of species-by-sampling-unit incidence
matrices/data.frames. The number of sampling units may vary among
datasets. However, within each dataset, all assemblages must have the
same number of sampling units. For each dataset,
iNEXTbeta3D() computes gamma, alpha, and beta diversity, as
well as dissimilarity among all N assemblages and other relevant
statistics, based on incidence frequency counts obtained from the
sampling units. Users can also set by_pair = TRUE to obtain
the corresponding results for every pair of assemblages.
Species incidence raw data format
We use tree species data collected from two second-growth
rainforests, Cuatro Rios (CR) and Juan Enriquez (JE), in Costa Rica, as
demo data to assess temporal beta diversity among three years (2005,
2011, and 2017) within each forest, with each year treated as an
assemblage. In each forest, data were collected from a 1-ha (50 m × 200
m) forest plot.
Because individuals of some tree species may exhibit intraspecific
spatial aggregation within a 1-ha plot, individual trees may not be
appropriately treated as independent sampling units. In such cases, it
is statistically preferable to convert species abundance data within
each forest into occurrence or incidence (detection/non-detection) data
for subplots or quadrats. See Chao et al. (2023b) for details of the
analysis.
Each 1-ha forest was divided into 100 subplots (0.01 ha each), and
only species incidence (detection/non-detection) records within each
subplot were used to compute the incidence frequency of each species
(i.e., the number of subplots in which the species was detected). By
treating species incidence frequencies across subplots as proxies for
species abundances, iNEXT.beta3D standardization can be
adapted to accommodate spatially aggregated data and reduce the effects
of intraspecific aggregation.
The data, named Second_growth_forests, consist of a list
containing two forests ("CR_2005_2011_2017" and
"JE_2005_2011_2017"). Each forest is represented by a list
of three species-by-sampling-unit incidence matrices corresponding to
2005, 2011, and 2017. Each matrix contains species in rows and 100
subplots (sampling units) in columns.
Run the following code to view the incidence raw data (only the first
10 rows and 6 columns of each matrix are shown).
data(Second_growth_forests)
Second_growth_forests
#> $CR_2005_2011_2017
#> $CR_2005_2011_2017$Year_2005
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Abaade 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 1 0 0 0 0
#> Aliatl 0 0 0 0 0 0
#> Ampmac 0 0 0 0 0 0
#> Anacra 0 1 0 0 0 1
#> Annama 0 1 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Ardfim 0 0 0 0 0 0
#>
#> $CR_2005_2011_2017$Year_2011
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Abaade 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 1 0 0 0 0
#> Aliatl 0 0 0 0 0 0
#> Ampmac 0 0 0 0 0 0
#> Anacra 0 1 0 0 0 1
#> Annama 0 0 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Ardfim 0 0 0 0 0 0
#>
#> $CR_2005_2011_2017$Year_2017
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Abaade 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 1 0 0 0 0
#> Aliatl 0 0 0 0 0 0
#> Ampmac 0 0 0 0 0 0
#> Anacra 0 1 1 0 1 1
#> Annama 0 0 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Ardfim 0 0 0 0 0 0
#>
#>
#> $JE_2005_2011_2017
#> $JE_2005_2011_2017$Year_2005
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Alccos 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 0 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Astcon 0 0 0 0 0 0
#> Bacgas 0 0 0 0 0 0
#> Brogui 0 0 0 0 0 0
#> Brolac 0 0 0 0 0 0
#> Byrcra 0 0 0 0 1 0
#>
#> $JE_2005_2011_2017$Year_2011
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Alccos 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 0 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Astcon 0 0 0 0 0 0
#> Bacgas 0 0 0 0 0 0
#> Brogui 0 0 0 0 0 0
#> Brolac 0 0 0 0 0 0
#> Byrcra 0 0 0 0 1 0
#>
#> $JE_2005_2011_2017$Year_2017
#> Subplot_1 Subplot_2 Subplot_3 Subplot_4 Subplot_5 Subplot_6
#> Alccos 0 0 0 0 0 0
#> Alcflo 0 0 0 0 0 0
#> Alclat 0 0 0 0 0 0
#> Annpap 0 0 0 0 0 0
#> Apemem 0 0 0 0 0 0
#> Astcon 0 0 0 0 0 0
#> Bacgas 0 0 0 0 0 0
#> Brogui 0 0 0 0 0 0
#> Brolac 0 0 0 0 0 0
#> Byrcra 0 0 0 0 0 0
MAIN FUNCTION: iNEXTbeta3D()
We first describe the main function iNEXTbeta3D() with
default arguments:
iNEXTbeta3D(data, diversity = "TD", q = c(0, 1, 2), datatype = "abundance",
base = "coverage", level = NULL, nboot = 10, conf = 0.95,
PDtree = NULL, PDreftime = NULL, PDtype = 'AUC', PDcut_number = 30,
FDdistM = NULL, FDtype = "AUC", FDtau = NULL, FDcut_number = 30,
by_pair = FALSE)
The arguments of this function are briefly described below and
explained in more detail through illustrative examples in subsequent
sections. By default (with base = “coverage”), the function
computes coverage-based standardized 3D gamma, alpha, and beta
diversity, as well as four dissimilarity indices, using coverage levels
from 0.5 to 1. For q = 0, estimates corresponding to sample sizes
greater than twice the reference sample size are excluded. When
base = “size”, the function computes size-based
standardized 3D gamma and alpha diversity estimates for sample sizes up
to twice the reference sample size in each dataset. The function also
computes standardized 3D estimates at user-specified sample sizes or
coverage levels.
data
|
For datatype = “abundance”, data for a single dataset
can be provided as a species-by-assemblage abundance
matrix/data.frame, with species in rows and assemblages in
columns. Data for multiple datasets should be provided as a
list of such matrices/data.frames, with each
element representing one dataset.
For datatype = “incidence_raw”, data for a single dataset
should be provided as a list of species-by-sampling-unit
incidence matrices/data.frames, with each element
representing one assemblage. Data for multiple datasets should be
provided as a list of such lists, with each outer-list element
representing one dataset.
|
diversity
|
Selection of the diversity type: diversity = “TD” for
Taxonomic diversity, diversity = “PD” for Phylogenetic
diversity, and diversity = “FD” for Functional diversity.
|
q
|
A numerical vector specifying the diversity orders. Default is
c(0, 1, 2).
|
datatype
|
Type of input data: individual-based abundance data (datatype =
“abundance”) or sampling-unit-based incidence data
(datatype = “incidence_raw”). For incidence raw data, each
species-by-sampling-unit matrix contains only 0 (non-detection) or 1
(detection).
|
base
|
Standardization base: coverage-based rarefaction and extrapolation for
gamma, alpha, beta diversity, as well as four classes of dissimilarity
indices (base = “coverage”), or size-based rarefaction and
extrapolation for gamma and alpha diversity (base =
“size”). Default is base = “coverage”.
|
level
|
A numeric vector specifying the target sample coverage levels (when
base = “coverage”) or sample sizes (when base =
“size”) used to compute standardized diversity and dissimilarity
estimates. For coverage-based standardization, the specified coverage
levels must be between 0 and 1. Setting level = 1 requests
estimates at complete coverage (i.e., asymptotic estimates), when
supported by the estimator.
By default, when base = “coverage”, the function
initially uses coverage levels ranging from 0.5 to 1 in increments of
0.025, together with the estimated gamma and alpha coverage levels at
the reference sample size and twice the reference sample size. For q =
0, estimates corresponding to sample sizes greater than twice the
reference sample size are excluded. Thus, the extrapolation limits
correspond to SC(2n, gamma) for gamma diversity and SC(2n, alpha) for
alpha and beta diversity, as well as dissimilarity measures. For q = 1
and 2, estimates can be extended to complete coverage when supported by
the data. The reference coverage for beta diversity and dissimilarity is
defined as that for alpha diversity.
When base = “size”, the function computes standardized 3D
gamma and alpha diversity estimates at sample-size knots spanning
rarefaction, the reference sample size, and extrapolation up to twice
the reference sample size.
|
nboot
|
A non-negative integer specifying the number of bootstrap replications
used to assess sampling uncertainty and construct confidence intervals.
Bootstrap replications can be time-consuming. Set nboot = 0
to skip the bootstrap procedures. Default is nboot = 10.
For more accurate uncertainty estimates, a larger number of replications
(e.g., 100 or 200) is recommended.
|
conf
|
A number between 0 and 1 specifying the confidence level. Default is
conf = 0.95.
|
PDtree
|
(required when diversity = “PD”), a phylogenetic tree (an R
phylo object) spanning all observed species across the
input datasets. The tree can be imported from a file in Newick format.
|
PDreftime
|
(argument only for diversity = “PD” and PDtype =
“meanPD”), a numerical value specifying a fixed time reference
point for phylogenetic diversity. Default is PDreftime =
NULL, in which case the age of the root of the phylogenetic tree
spanned by the pooled observed species is used.
|
PDtype
|
(argument only for diversity = “PD”), specifies the
phylogenetic diversity measure: PDtype = “meanPD” for the
effective number of equally divergent lineages at a specified reference
time, or PDtype = “AUC” for an overall measure obtained by
integrating and averaging mean phylogenetic diversity over all reference
times from zero to the root age of the phylogenetic tree. Default is
PDtype = “AUC”.
|
PDcut_number
|
(argument only for diversity = “PD” and PDtype =
“AUC”), an integer specifying the number of equally spaced
integration points used to compute the AUC over the interval from zero
to the root age of the phylogenetic tree. Default is PDcut_number
= 30, and the minimum is 3.
|
FDdistM
|
(required when diversity = “FD”), a species pairwise
distance matrix covering all species observed across the input datasets.
|
FDtype
|
(argument only for diversity = “FD”), specifies the
functional diversity measure: FDtype = “tau_value” for FD
at a specified threshold of functional distinctiveness, or FDtype
= “AUC” for an overall FD measure obtained by integrating the
tau-profile over threshold values from 0 to 1. Default is FDtype =
“AUC”.
|
FDtau
|
(argument only for diversity = “FD” and FDtype =
“tau_value”), a numeric value between 0 and 1 specifying the
threshold of functional distinctiveness used to compute FD. If
FDtau = NULL (default), the threshold is set to the mean
pairwise functional distance between two individuals randomly selected
from the pooled data across all datasets (i.e., Rao’s quadratic
entropy).
|
FDcut_number
|
(argument only for diversity = “FD” and FDtype =
“AUC”), an integer specifying the number of equally spaced
integration points used to compute the AUC over the interval from 0 to
1. Default is FDcut_number = 30, and the minimum is 3.
|
by_pair
|
A logical variable specifying whether diversity decomposition is
performed for all assemblages as a whole or for every pair of
assemblages. If by_pair = FALSE, gamma, alpha, and beta
diversity, as well as dissimilarity, are computed for all assemblages
within each dataset considered as a whole. If by_pair =
TRUE, the corresponding estimates are computed for every pair of
assemblages. Default is by_pair = FALSE.
|
This function returns an iNEXTbeta3D object that can be
visualized using ggiNEXTbeta3D(), as described below. When
by_pair = FALSE, ggiNEXTbeta3D() returns a
single ggplot object. When by_pair = TRUE, it
returns a named list of ggplot objects, with one plot for
each dataset. Within each plot, different pairs of assemblages are
distinguished by color.
Output of the main function iNEXTbeta3D()
By default (with base = "coverage"), for each of the
three diversity dimensions (TD, PD, and FD), iNEXTbeta3D()
returns an "iNEXTbeta3D" object containing seven data
frames for each dataset:
- gamma (standardized gamma diversity)
- alpha (standardized alpha diversity)
- beta (standardized beta diversity)
- 1-C (standardized Sørensen-type non-overlap index)
- 1-U (standardized Jaccard-type non-overlap index)
- 1-V (standardized Sørensen-type turnover index)
- 1-S (standardized Jaccard-type turnover index)
For PDtype = "meanPD", the gamma output includes
Gamma_PD and Gamma_meanPD, whereas the alpha
output includes Alpha_PD and Alpha_meanPD.
These quantities satisfy Gamma_PD = Gamma_meanPD × Reftime
and Alpha_PD = Alpha_meanPD × Reftime. The PD-based and
meanPD-based beta diversity and dissimilarity estimates are identical
after multiplicative decomposition; therefore, only one set of estimates
is reported.
When base = "size", for each of the three diversity
dimensions (TD, PD, and FD), iNEXTbeta3D() returns an
"iNEXTbeta3D" object containing two data frames for each
dataset:
- gamma (size-based standardized gamma diversity)
- alpha (size-based standardized alpha diversity)
Size-based beta diversity and dissimilarity indices are not
statistically valid measures and are therefore not provided.
GRAPHIC DISPLAYS: FUNCTION
ggiNEXTbeta3D()
The function ggiNEXTbeta3D() and its default arguments
are introduced below. It supports output generated by
iNEXTbeta3D() with both by_pair = FALSE and
by_pair = TRUE.
ggiNEXTbeta3D(output, type = "B")
output
|
An object returned by iNEXTbeta3D().
|
type
|
(argument only for base = “coverage”),
type = “B” generates R/E sampling curves for gamma, alpha,
and beta diversity, whereas type = “D” generates R/E
sampling curves for four dissimilarity indices. The type
argument is not required when plotting size-based R/E sampling curves
for gamma and alpha diversity.
|
type = “B” generates R/E sampling curves for gamma,
alpha, and beta diversity, whereas type = “D” generates R/E
sampling curves for four dissimilarity indices. The type
argument is not required when plotting size-based R/E sampling curves
for gamma and alpha diversity.
generates R/E sampling curves for gamma, alpha, and beta diversity,
whereas generates R/E sampling curves for four dissimilarity indices.
The argument is not required when plotting size-based R/E sampling
curves for gamma and alpha diversity.
The ggiNEXTbeta3D() function is a wrapper around the
ggplot2 package that creates rarefaction and extrapolation
(R/E) sampling curves with a single line of code. When
by_pair = FALSE, it returns a single "ggplot"
object that can be further customized using ggplot2
functions. When by_pair = TRUE, it returns a named list of
"ggplot" objects, with one plot for each dataset.
DATA INFORMATION: FUNCTION
DataInfobeta3D()
The function DataInfobeta3D() provides basic information
about (1) the reference sample from each individual assemblage, (2) the
gamma reference sample from the pooled assemblage, and (3) the alpha
reference sample from the joint assemblage. The function and its default
arguments are shown below:
DataInfobeta3D(data, diversity = "TD", datatype = "abundance",
PDtree = NULL, PDreftime = NULL, PDtype = "meanPD",
FDdistM = NULL, FDtype = "AUC", FDtau = NULL, by_pair = FALSE)
Arguments shared by DataInfobeta3D() and
iNEXTbeta3D() have the same definitions as described above.
The function returns basic information for each of the three diversity
dimensions, including the reference sample size, observed species
richness, estimated sample coverage at the reference and doubled sample
sizes (SC(n) and SC(2n) for abundance data, or
SC(T) and SC(2T) for incidence data), and
other relevant statistics. We use the Brazil_rainforests
dataset to demonstrate the function for each diversity dimension.
## Data information for taxonomic diversity
data(Brazil_rainforests)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'TD', datatype = 'abundance')
#> Dataset Assemblage n S.obs SC(n) SC(2n) f1 f2 f3 f4 f5
#> 1 Marim Edge 158 84 0.691 0.852 49 18 8 4 1
#> 2 Marim Interior 144 80 0.704 0.899 43 23 7 5 0
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 44 34 17 9 7
#> 4 Marim Joint assemblage 302 164 0.696 0.876 92 41 15 9 1
#> 5 Rebio2 Edge 162 70 0.754 0.895 40 17 4 2 0
#> 6 Rebio2 Interior 168 74 0.763 0.877 40 13 8 4 4
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 60 18 15 5 3
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 80 30 12 6 4
Output description:
Dataset = the input datasets.
Pair = the pair of assemblages being compared; this
column is included only when by_pair = TRUE.
Assemblage = individual assemblages,
"Pooled assemblage" (for gamma diversity), or
"Joint assemblage" (for alpha diversity).
n = number of observed individuals in the reference
sample (sample size).
S.obs = number of observed species in the reference
sample.
SC(n) = estimated sample coverage of the reference
sample.
SC(2n) = estimated sample coverage of twice the
reference sample size.
f1–f5 = the first five species
abundance frequency counts in the reference sample.
Below, we use the demo dataset Second_growth_forests to
illustrate the output of DataInfobeta3D() for incidence raw
data:
## Data information for taxonomic diversity with incidence data
data(Second_growth_forests)
DataInfobeta3D(data = Second_growth_forests, diversity = 'TD', datatype = 'incidence_raw',
by_pair = FALSE)
#> Dataset Assemblage T U S.obs SC(T) SC(2T) Q1 Q2 Q3 Q4 Q5
#> 1 CR_2005_2011_2017 Year_2005 100 787 135 0.919 0.953 64 17 16 6 4
#> 2 CR_2005_2011_2017 Year_2011 100 768 135 0.916 0.952 65 18 12 7 5
#> 3 CR_2005_2011_2017 Year_2017 100 768 134 0.917 0.956 64 20 11 8 3
#> 4 CR_2005_2011_2017 Pooled assemblage 100 929 152 0.926 0.961 69 22 15 6 6
#> 5 CR_2005_2011_2017 Joint assemblage 100 2323 404 0.917 0.953 193 55 39 21 12
#> 6 JE_2005_2011_2017 Year_2005 100 503 71 0.955 0.979 23 9 8 4 0
#> 7 JE_2005_2011_2017 Year_2011 100 631 88 0.942 0.962 37 8 4 6 7
#> 8 JE_2005_2011_2017 Year_2017 100 659 91 0.953 0.979 31 12 8 3 5
#> 9 JE_2005_2011_2017 Pooled assemblage 100 908 108 0.964 0.985 33 14 9 6 8
#> 10 JE_2005_2011_2017 Joint assemblage 100 1793 250 0.950 0.973 91 29 20 13 12
Information description:
Dataset = the input datasets.
Pair = the pair of assemblages being compared; this
column is included only when by_pair = TRUE.
Assemblage = individual assemblages,
"Pooled assemblage" (for gamma diversity), or
"Joint assemblage" (for alpha diversity).
T = number of sampling units in the reference sample
(sample size for incidence data).
U = total number of incidences in the reference
sample.
S.obs = number of observed species in the reference
sample.
SC(T) = estimated sample coverage of the reference
sample.
SC(2T) = estimated sample coverage of twice the
reference sample size.
Q1–Q5 = the first five species
incidence frequency counts in the reference sample.
To obtain the corresponding data information for every pair of
assemblages within each dataset, set by_pair = TRUE and run
the following code:
## Data information for taxonomic diversity for every pair of assemblages (incidence data)
data(Second_growth_forests)
DataInfobeta3D(data = Second_growth_forests, diversity = 'TD', datatype = 'incidence_raw',
by_pair = TRUE)
#> Dataset Pair Assemblage T U S.obs SC(T) SC(2T) Q1 Q2 Q3 Q4
#> 1 CR_2005_2011_2017 Year_2005 100 787 135 0.919 0.953 64 17 16 6
#> 2 CR_2005_2011_2017 Year_2011 100 768 135 0.916 0.952 65 18 12 7
#> 3 CR_2005_2011_2017 Year_2017 100 768 134 0.917 0.956 64 20 11 8
#> 4 CR_2005_2011_2017 Year_2005 vs. Year_2011 Pooled assemblage 100 860 145 0.920 0.954 69 19 13 5
#> 5 CR_2005_2011_2017 Year_2005 vs. Year_2011 Joint assemblage 100 1555 270 0.917 0.952 129 35 28 13
#> 6 CR_2005_2011_2017 Year_2005 vs. Year_2017 Pooled assemblage 100 923 151 0.925 0.959 70 21 14 6
#> 7 CR_2005_2011_2017 Year_2005 vs. Year_2017 Joint assemblage 100 1555 269 0.918 0.954 128 37 27 14
#> 8 CR_2005_2011_2017 Year_2011 vs. Year_2017 Pooled assemblage 100 837 142 0.923 0.958 65 20 15 7
#> 9 CR_2005_2011_2017 Year_2011 vs. Year_2017 Joint assemblage 100 1536 269 0.917 0.954 129 38 23 15
#> 10 JE_2005_2011_2017 Year_2005 100 503 71 0.955 0.979 23 9 8 4
#> 11 JE_2005_2011_2017 Year_2011 100 631 88 0.942 0.962 37 8 4 6
#> 12 JE_2005_2011_2017 Year_2017 100 659 91 0.953 0.979 31 12 8 3
#> 13 JE_2005_2011_2017 Year_2005 vs. Year_2011 Pooled assemblage 100 757 96 0.951 0.969 37 8 6 7
#> 14 JE_2005_2011_2017 Year_2005 vs. Year_2011 Joint assemblage 100 1134 159 0.947 0.970 60 17 12 10
#> 15 JE_2005_2011_2017 Year_2005 vs. Year_2017 Pooled assemblage 100 864 107 0.963 0.987 32 17 9 4
#> 16 JE_2005_2011_2017 Year_2005 vs. Year_2017 Joint assemblage 100 1162 162 0.954 0.979 54 21 16 7
#> 17 JE_2005_2011_2017 Year_2011 vs. Year_2017 Pooled assemblage 100 788 100 0.958 0.981 33 13 8 6
#> 18 JE_2005_2011_2017 Year_2011 vs. Year_2017 Joint assemblage 100 1290 179 0.948 0.971 68 20 12 9
The output columns have the same definitions as those described above
and are therefore not repeated here. When by_pair = TRUE,
the Pair column identifies the two assemblages being
compared.
## Data information for mean phylogenetic diversity
data(Brazil_rainforests)
data(Brazil_tree)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'PD', datatype = 'abundance',
PDtype = 'meanPD', PDtree = Brazil_tree, PDreftime = NULL)
#> Dataset Assemblage n S.obs SC(n) SC(2n) PD.obs meanPD.obs f1* f2* g1 g2 Reftime
#> 1 Marim Edge 158 84 0.691 0.852 8805 22.0 49 26 3278 2188 400
#> 2 Marim Interior 144 80 0.704 0.899 8436 21.1 43 28 2974 1935 400
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 11842 29.6 44 39 3172 2995 400
#> 4 Marim Joint assemblage 302 164 0.696 0.876 17241 43.1 92 54 6252 4123 400
#> 5 Rebio2 Edge 162 70 0.754 0.895 7874 19.7 40 23 3648 1717 400
#> 6 Rebio2 Interior 168 74 0.763 0.877 8360 20.9 40 17 3365 1954 400
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 11979 29.9 60 23 5063 1637 400
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 16234 40.6 80 40 7013 3671 400
For PDtype = "meanPD", the output information is
described as follows:
Dataset, Pair, Assemblage,
n, S.obs, SC(n), and
SC(2n) = definitions are the same as those in the TD
output.
PD.obs = the observed total branch length in the
phylogenetic tree spanned by all observed species.
meanPD.obs = the observed mean phylogenetic
diversity, calculated as PD.obs / Reftime.
f1*, f2* = the numbers of singletons
and doubletons, respectively, in the node/branch abundance set.
g1, g2 = the total branch lengths of
those singletons and doubletons, respectively, in the node/branch
abundance set.
Reftime = the user-specified reference time used for
phylogenetic diversity calculations. If PDreftime = NULL
(default), the root age of the phylogenetic tree spanning the pooled
observed species is used.
## Data information for phylogenetic diversity when all time reference points are considered
data(Brazil_rainforests)
data(Brazil_tree)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'PD',
datatype = 'abundance', PDtype = 'AUC',
PDtree = Brazil_tree)
#> Dataset Assemblage n S.obs SC(n) SC(2n) Tmax
#> 1 Marim Edge 158 84 0.691 0.852 400
#> 2 Marim Interior 144 80 0.704 0.899 400
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 400
#> 4 Marim Joint assemblage 302 164 0.696 0.876 400
#> 5 Rebio2 Edge 162 70 0.754 0.895 400
#> 6 Rebio2 Interior 168 74 0.763 0.877 400
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 400
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 400
For PDtype = "AUC", the output information is described
as follows:
Dataset, Pair, Assemblage,
n, S.obs, SC(n), and
SC(2n) = definitions are the same as those in the TD
output.
Tmax = the integration end time for AUC-based
phylogenetic diversity, corresponding to the root age of the
phylogenetic tree spanning the pooled observed species. The integration
starts at zero.
## Data information for functional diversity (FDtype = 'tau_value', FDtau = NULL)
data(Brazil_rainforests)
data(Brazil_distM)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'FD', datatype = 'abundance',
FDdistM = Brazil_distM, FDtype = 'tau_value', FDtau = NULL)
#> Dataset Assemblage n S.obs SC(n) SC(2n) a1* a2* h1 h2 Tau
#> 1 Marim Edge 158 84 0.691 0.852 0 0 0 0 0.343
#> 2 Marim Interior 144 80 0.704 0.899 0 0 0 0 0.343
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 0 0 0 0 0.343
#> 4 Marim Joint assemblage 302 164 0.696 0.876 0 0 0 0 0.343
#> 5 Rebio2 Edge 162 70 0.754 0.895 0 0 0 0 0.343
#> 6 Rebio2 Interior 168 74 0.763 0.877 0 0 0 0 0.343
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 0 0 0 0 0.343
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 0 0 0 0 0.343
For FDtype = "tau_value", the output information is
described as follows:
Dataset, Pair, Assemblage,
n, S.obs, SC(n), and
SC(2n) = definitions are the same as those in the TD
output.
a1*, a2* = the numbers of singletons
and doubletons, respectively, in the functional abundances at the
specified threshold of functional distinctiveness
(Tau).
h1, h2 = the total contributions of
functional singletons and doubletons, respectively, at the specified
threshold.
Tau = the user-specified threshold level for
functional distinctiveness. If FDtau = NULL (default), the
threshold is set to dmean, the mean distance between two
individuals randomly selected from the pooled data across all
datasets.
For comparison, we also consider a user-specified threshold value of
FDtau = 0.2 to illustrate how the data information changes
with the selected threshold.
## Data information for functional diversity (tau = 0.2)
data(Brazil_rainforests)
data(Brazil_distM)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'FD',
datatype = 'abundance', FDdistM = Brazil_distM,
FDtype = 'tau_value', FDtau = 0.2)
#> Dataset Assemblage n S.obs SC(n) SC(2n) a1* a2* h1 h2 Tau
#> 1 Marim Edge 158 84 0.691 0.852 1 2 1.00 1.50 0.2
#> 2 Marim Interior 144 80 0.704 0.899 0 1 0.00 0.50 0.2
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 0 1 0.00 0.50 0.2
#> 4 Marim Joint assemblage 302 164 0.696 0.876 5 9 2.12 2.31 0.2
#> 5 Rebio2 Edge 162 70 0.754 0.895 0 1 0.00 0.50 0.2
#> 6 Rebio2 Interior 168 74 0.763 0.877 0 1 0.00 0.50 0.2
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 0 1 0.00 0.50 0.2
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 6 7 2.29 1.95 0.2
Compared with the default threshold (Tau = 0.343), at
which a1*, a2*, h1, and
h2 are all zero, the user-specified threshold
(Tau = 0.2) yields nonzero values for some of these
quantities. This example illustrates that singleton- and
doubleton-related statistics depend on the selected threshold of
functional distinctiveness.
## Data information for functional diversity (FDtype = 'AUC')
data(Brazil_rainforests)
data(Brazil_distM)
DataInfobeta3D(data = Brazil_rainforests, diversity = 'FD', datatype = 'abundance',
FDdistM = Brazil_distM, FDtype = 'AUC')
#> Dataset Assemblage n S.obs SC(n) SC(2n) dmin dmean dmax
#> 1 Marim Edge 158 84 0.691 0.852 0 0.329 0.755
#> 2 Marim Interior 144 80 0.704 0.899 0 0.313 0.663
#> 3 Marim Pooled assemblage 302 119 0.855 0.969 0 0.323 0.755
#> 4 Marim Joint assemblage 302 164 0.696 0.876 0 0.323 0.755
#> 5 Rebio2 Edge 162 70 0.754 0.895 0 0.376 0.659
#> 6 Rebio2 Interior 168 74 0.763 0.877 0 0.310 0.660
#> 7 Rebio2 Pooled assemblage 330 118 0.819 0.901 0 0.355 0.770
#> 8 Rebio2 Joint assemblage 330 144 0.758 0.886 0 0.355 0.770
For FDtype = "AUC", the output information is described
as follows:
Dataset, Pair, Assemblage,
n, S.obs, SC(n), and
SC(2n) = definitions are the same as those in the TD
output.
dmin = the minimum distance among all non-diagonal
elements in the species pairwise distance matrix.
dmean = the mean functional distance between two
individuals randomly selected from the assemblage under
consideration.
dmax = the maximum pairwise distance among species
in the distance matrix.
License and feedback
The iNEXT.beta3D package is licensed under the GPLv3. To
help refine iNEXT.beta3D, users’ comments or feedback would
be welcome (please send them to Anne Chao or report an issue on the
iNEXT.beta3D GitHub iNEXT.beta3D_github).
References
Chao, A., Chiu, C.-H., Hu, K.-H., and Zelený, D. (2023a).
Revisiting Alwyn H. Gentry’s forest transect data: a statistical
sampling-model-based approach. Japanese Journal of Statistics and
Data Science, 6, 861-884. (https://doi.org/10.1007/s42081-023-00214-1)
Chao, A., Chiu, C.-H., Villéger, S., Sun, I.-F., Thorn, S., Lin,
Y.-C., Chiang, J. M., and Sherwin, W. B. (2019). An attribute-diversity
approach to functional diversity, functional beta diversity, and related
(dis)similarity measures. Ecological Monographs, 89, e01343.
Chao, A., Henderson, P. A., Chiu, C.-H., Moyes, F., Hu, K.-H.,
Dornelas, M. and Magurran, A. E. (2021). Measuring temporal change in
alpha diversity: a framework integrating taxonomic, phylogenetic and
functional diversity and the iNEXT.3D standardization. Methods in
Ecology and Evolution, 12, 1926-1940.
Chao, A., Thorn, S., Chiu, C.-H., Moyes, F., Hu, K.-H., Chazdon,
R. L., Wu, J., Magnago, L. F. S., Dornelas, M., Zelený, D., Colwell, R.
K., and Magurran, A. E. (2023b). Rarefaction and extrapolation with beta
diversity under a framework of Hill numbers: the iNEXT.beta3D
standardization. Ecological Monographs e1588. (https://doi.org/10.1002/ecm.1588)