A Quick Introduction to iNEXT.link via Examples

Anne Chao, K.S. Hu, K.W. Chen, C.G. Lo, S.Y. Wang

2023-09-07

iNEXT.link is an R package that extends the concepts of iNEXT.3D (Chao et al., 2021), iNEXT.4step (Chao et al., 2020) and iNEXT.beta3D (Chao et al., 2023) to ecological networks (Chiu et al., 2023). In this document, we provide a brief overview of iNEXT.link and its functionalities. Detailed information about the iNEXT.link functions can be found in the iNEXT.link manual, which is also available on Github. For users without an R background, an online version (https://chao.shinyapps.io/iNEXT_link/) of iNEXT.link is also available.

iNEXT.link is primarily designed to calculate and analyze various measures of diversity in ecological networks. Specifically, the package calculates three Hill numbers of order q (species richness, Shannon diversity, and Simpson diversity) in taxonomic diversity level, as well as phylogenetic and functional diversity levels.

For single ecological networks, iNEXT.link provides tools for analyzing diversity. The package provides two types of rarefaction and extrapolation (R/E) sampling curves to estimate diversity and confidence intervals for single ecological networks. These include sample-size-based (or size-based) R/E curves and coverage-based R/E curves.

Moreover, iNEXT.link offers dissimilarity-turnover curves for the coverage-based R/E curves for gamma, alpha, and beta diversity measures, which can be used to compare diversity patterns across different ecological networks.

Functions for Single community:

Function for Multi-community:

Functions for Visualizing Results:

First, we load data from iNEXT.link:

DATA FORMAT/INFORMATION

Supported Data Types:

Individual-based interaction data : Input data matrix for each assemblage/site include samples species interactions in an empirical sample of n total interactions (“reference sample”). When dealing with N networks, the input data consists of N lists of species interaction matrix.

RAREFACTION/EXTRAPOLATION VIA EXAMPLES

The data set (tree-beetles interaction data) is included in iNEXT.link package. The experiment took place in the Steigerwald forest in Germany, where deadwood objects from six tree species were exposed in open, net, and closed habitats. In each habitat, there are six plots (A, B, C, D, E, F). Saproxilic beetles were sampled using stem emergence traps and classified according to their functional traits. Data from four years were pooled for each plot and habitat, and pairwise distances were computed from the Gower distance. Here, the demonstration only uses data from plot A in each habitat. For these data, the following commands display the sample species interactions and run the iNEXT.link() function for three types of diversty ("TD", "PD", "FD" with specified threshold (default is dmean (quadratic entropy)), "AUC" which integrates FD from threshold 0 to 1).

Under taxonomic diversity dimension, iNEXT.link() function returns including: $DataInfo for summarizing data information; $iNextEst for showing diversity estimates along with related statistics for a series of rarefied and extrapolated samples; and $AsyEst for showing asymptotic diversity estimates along with related statistics. Result under phylogenetic diversity or functional diversity includes these three parts, too.

$DataInfo in TD example, as shown below, returns basic data information. It can also be presented using function DataInfo.link() to get the same result.

Because the three kinds of diversity output are similar, the demo shows TD only.

linkoutTD = iNEXT.link(data = beetles, diversity = 'TD', q = c(0,1,2), nboot = 30)
linkoutTD$DataInfo
#>   Networks    n S.obs(row) S.obs(col) Links.obs Connectance Coverage  f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
#> 1   Closed  816          6         83       178      0.3574   0.8800  98 31 15  3  3  5  0  2  2   1
#> 2     Open 1932          6         88       206      0.3902   0.9431 110 33 15  8  7  5  3  2  3   2

Second part of output from function iNEXT.link is diversity estimates and related statistics computed for these 40 knots by default, which locates the reference sample size at the mid-point of the selected knots. The diversity can be based on sample-size-based and sample coverage-based. The first data frame of list $iNextEst (as shown below for ‘size_based’) includes the sample size (m), the Method (Rarefaction, Observed, or Extrapolation, depending on whether the size m is less than, equal to, or greater than the reference sample size), the diversity order (Order.q), the diversity estimate of order q (qD in TD, qPD in PD, qFD in FD (under specified thresholds), qAUC in FD (area under curve)), the lower and upper confidence limits of diversity (qD.LCL and qD.UCL in TD, qPD.LCL and qPD.UCL in PD, qFD.LCL and qFD.UCL in FD (under specified thresholds), qAUC.LCL and qAUC.UCL in FD (area under curve)) conditioning on sample size, and the sample coverage estimate (SC) along with the lower and upper confidence limits of sample coverage (SC.LCL, SC.UCL). These sample coverage estimates with confidence intervals are used for plotting the sample completeness curve. It is time consuming for diversity = FD and FDtype = "AUC". If the argument nboot is greater than zero, then the bootstrap method is applied to obtain the confidence intervals for each diversity and sample coverage estimates.

Here only show first six rows:

head(linkoutTD$iNextEst$size_based)
#> # A tibble: 6 x 10
#>   Assemblage     m Method      Order.q    qD qD.LCL qD.UCL     SC SC.LCL SC.UCL
#>   <chr>      <dbl> <chr>         <dbl> <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>
#> 1 Closed         1 Rarefaction       0   1      1      1   0.0295 0.0254 0.0335
#> 2 Closed        43 Rarefaction       0  28.0   27.0   29.1 0.543  0.515  0.571 
#> 3 Closed        86 Rarefaction       0  44.8   42.7   46.9 0.661  0.637  0.685 
#> 4 Closed       129 Rarefaction       0  58.2   55.1   61.2 0.713  0.691  0.735 
#> 5 Closed       172 Rarefaction       0  69.8   65.9   73.6 0.745  0.725  0.766 
#> 6 Closed       215 Rarefaction       0  80.2   75.6   84.9 0.767  0.748  0.787

The second data frame of list $iNextEst (as shown below for ‘coverage_based’) includes the sample coverage estimate (‘SC’), the sample size (m), the Method (Rarefaction, Observed, or Extrapolation, depending on whether the size m is less than, equal to, or greater than the reference sample size), the diversity order (Order.q), the diversity estimate of order q (qD in TD, qPD in PD, qFD in FD (under specified thresholds), qAUC in FD (area under curve)), the lower and upper confidence limits of diversity (qD.LCL and qD.UCL in TD, qPD.LCL and qPD.UCL in PD, qFD.LCL and qFD.UCL in FD (under specified thresholds), qAUC.LCL and qAUC.UCL in FD (area under curve)) conditioning on sample coverage estimate.

Here only show first six rows:

head(linkoutTD$iNextEst$coverage_based)
#> # A tibble: 6 x 8
#>   Assemblage     SC      m Method      Order.q    qD qD.LCL qD.UCL
#>   <chr>       <dbl>  <dbl> <chr>         <dbl> <dbl>  <dbl>  <dbl>
#> 1 Closed     0.0295   1.00 Rarefaction       0  1.00  0.937   1.06
#> 2 Closed     0.543   43.0  Rarefaction       0 28.0  24.5    31.6 
#> 3 Closed     0.661   86.0  Rarefaction       0 44.8  38.7    50.8 
#> 4 Closed     0.713  129.   Rarefaction       0 58.2  49.9    66.4 
#> 5 Closed     0.745  172.   Rarefaction       0 69.8  59.6    79.9 
#> 6 Closed     0.767  215.   Rarefaction       0 80.2  68.4    92.1

The output $AsyEst lists the diversity labels (Diversity in TD, Phylogenetic Diversity in PD, Functional Diversity in FD), the observed diversity (Observed in TD, Phylogenetic Observed in PD, Functional Observed in FD), asymptotic diversity estimates (Estimator in TD, Phylogenetic Estimator in PD, Functional Estimator in FD), estimated bootstrap standard error (s.e.) and confidence intervals for diversity with q = 0, 1, and 2 (LCL, UCL). The estimated asymptotic and observed diversity can also be computed via the function AO.link(). The output are shown below:

Here only show first six rows:

head(linkoutTD$AsyEst)
#>   Assemblage         Diversity   Observed  Estimator      s.e.        LCL        UCL
#> 1     Closed  Species richness 178.000000 332.713393 21.092987 291.371898 374.054889
#> 2     Closed Shannon diversity  64.690053  80.316088  5.685330  69.173046  91.459130
#> 3     Closed Simpson diversity  32.627205  33.944467  2.136374  29.757251  38.131683
#> 4       Open  Species richness 206.000000 389.238440 37.655649 315.434725 463.042155
#> 5       Open Shannon diversity  23.311453  25.911799  1.484906  23.001437  28.822162
#> 6       Open Simpson diversity   8.059978   8.089554  0.322261   7.457934   8.721174

License

The iNEXT.link package is licensed under the GPLv3. To help refine iNEXT.link, your comments or feedback would be welcome (please send them to Anne Chao or report an issue on the iNEXT.link github iNEXT.link_github.

References