You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/Create_SpAR.Rmd
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ vignette: >
5
5
%\VignetteIndexEntry{Construct a Speciation-Area Relationship with ssarp}
6
6
%\VignetteEngine{knitr::rmarkdown}
7
7
%\VignetteEncoding{UTF-8}
8
+
header-includes:
9
+
- \usepackage{textgreek}
8
10
---
9
11
10
12
@@ -67,19 +69,19 @@ tree <- read.tree(system.file("extdata",
67
69
```
68
70

69
71
70
-
Now that we have a phylogenetic tree, we can estimate tip speciation rates for use in our speciation-area relationship. *ssarp* includes three methods for estimating tip speciation rates: BAMM (Rabosky 2014), the lambda calculation for crown groups from Magallόn and Sanderson (2001), and DR (Jetz et al. 2012).
72
+
Now that we have a phylogenetic tree, we can estimate tip speciation rates for use in our speciation-area relationship. *ssarp* includes three methods for estimating tip speciation rates: BAMM (Rabosky 2014), the lambda calculation for crown groups from `r if (knitr::is_html_output()) "Magallόn" else "Magallon"` and Sanderson (2001), and DR (Jetz et al. 2012).
71
73
72
74
The `ssarp::estimate_bamm()` function requires a `bammdata` object as input, which must be created using the `BAMMtools` package (Rabosky et al. 2014) after the user completes a BAMM analysis. This object includes tip speciation rates by default in the “meanTipLambda” list element, which `ssarp` accesses to add the appropriate tip speciation rates for each species to the occurrence record dataframe.
73
75
74
76
DR stands for “diversification rate,” but it is ultimately a better estimation of speciation rate than net diversification (Belmaker and Jetz 2015; Quintero and Jetz 2018) and returns results similar to BAMM’s tip speciation rate estimations (Title and Rabosky 2019). The `ssarp::estimate_dr()` function returns the values obtained from running an adapted version of the “DR_statistic” function from Sun and Folk (2020).
75
77
76
-
In addition to tip speciation rates, `ssarp` includes a function for calculating the speciation rate for a clade from Magallόn and Sanderson (2001). The `ssarp::estimate_ms()` function uses the `ape::subtrees` function (Paradis and Schliep 2019) to generate all possible subtrees from the user-provided phylogenetic tree that corresponds with the taxa of interest for the SpAR. Then, species in the provided occurrence records generated from previous steps in the `ssarp` workflow are grouped by island. For each group of species that comprise an island, the number of subtrees that represent that group of species and the root age of each subtree is recorded, along with the name and area of the island. The speciation rate for each subtree is then calculated following Equation 4 in Magallόn and Sanderson (2001). If an island includes multiple subtrees, the island speciation rate is the average of the calculated speciation rates. This average is calculated when the SpAR is plotted.
78
+
In addition to tip speciation rates, `ssarp` includes a function for calculating the speciation rate for a clade from `r if (knitr::is_html_output()) "Magallόn" else "Magallon"` and Sanderson (2001). The `ssarp::estimate_ms()` function uses the `ape::subtrees` function (Paradis and Schliep 2019) to generate all possible subtrees from the user-provided phylogenetic tree that corresponds with the taxa of interest for the SpAR. Then, species in the provided occurrence records generated from previous steps in the `ssarp` workflow are grouped by island. For each group of species that comprise an island, the number of subtrees that represent that group of species and the root age of each subtree is recorded, along with the name and area of the island. The speciation rate for each subtree is then calculated following Equation 4 in `r if (knitr::is_html_output()) "Magallόn" else "Magallon"` and Sanderson (2001). If an island includes multiple subtrees, the island speciation rate is the average of the calculated speciation rates. This average is calculated when the SpAR is plotted.
77
79
78
-
In this example, we will use the lambda calculation for crown groups from Magallόn and Sanderson (2001) through the `ssarp::estimate_ms()` function. The "label_type" parameter in this function tells *ssarp* whether the tip labels on the given tree include the full species name (binomial) or just the specific epithet (epithet).
80
+
In this example, we will use the lambda calculation for crown groups from `r if (knitr::is_html_output()) "Magallόn" else "Magallon"` and Sanderson (2001) through the `ssarp::estimate_ms()` function. The "label_type" parameter in this function tells *ssarp* whether the tip labels on the given tree include the full species name (binomial) or just the specific epithet (epithet).
79
81
80
82
81
83
```r
82
-
# Calculate tip speciation rates using the lambda calculation for crown groups from Magallόn and Sanderson (2001)
84
+
# Calculate tip speciation rates using the lambda calculation for crown groups from Magallon and Sanderson (2001)

120
122
121
123
122
-
You will notice that two of the largest islands have a speciation rate of zero in this example. This very likely occurred because the calculation for speciation rate in Magallόn and Sanderson (2001) that `ssarp::estimate_ms()` uses is based on monophyly, which can be disrupted on islands with non-native species occurrence records. When using the `ssarp::estimate_ms()` function to estimate speciation rates for a SpAR, it is incredibly important to manually filter the returned occurrence records to remove non-native species.
124
+
You will notice that two of the largest islands have a speciation rate of zero in this example. This very likely occurred because the calculation for speciation rate in `r if (knitr::is_html_output()) "Magallόn" else "Magallon"` and Sanderson (2001) that `ssarp::estimate_ms()` uses is based on monophyly, which can be disrupted on islands with non-native species occurrence records. When using the `ssarp::estimate_ms()` function to estimate speciation rates for a SpAR, it is incredibly important to manually filter the returned occurrence records to remove non-native species.
123
125
124
126
125
127
### Literature Cited
126
128
127
129
* Belmaker, J., & Jetz, W. (2015). Relative roles of ecological and energetic constraints, diversification rates and region history on global species richness gradients. Ecology Letters, 18: 563–571.
128
130
* Jetz, W., Thomas, G.H., Joy, J.B., Hartmann, K., & Mooers, A.O. (2012). The global diversity of birds in space and time. Nature, 491: 444-448.
129
131
* Losos, J.B. & Schluter, D. (2000). Analysis of an evolutionary species-area relationship. Nature, 408: 847-850.
130
-
* Magallόn, S. & Sanderson, M.J. (2001). Absolute Diversification Rates in Angiosperm Clades. Evolution, 55(9): 1762-1780.
132
+
*`r if (knitr::is_html_output()) "Magallόn" else "Magallon"`, S. & Sanderson, M.J. (2001). Absolute Diversification Rates in Angiosperm Clades. Evolution, 55(9): 1762-1780.
131
133
* Paradis, E. & Schliep, K. (2019). ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics, 35: 526-528.
132
134
* Patton, A.H., Harmon, L.J., del Rosario Castañeda, M., Frank, H.K., Donihue, C.M., Herrel, A., & Losos, J.B. (2021). When adaptive radiations collide: Different evolutionary trajectories between and within island and mainland lizard clades. PNAS, 118(42): e2024451118.
133
135
* Quintero, I., & Jetz, W. (2018). Global elevational diversity and diversification of birds. Nature, 555, 246–250.
0 commit comments