Use segmented regression to create a speciation-area relationship plot. The X axis represents log(island area) and the Y axis represents log(speciation rate)
Arguments
- occurrences
The dataframe output by one of SSARP's speciation methods (
SSARP::estimate_BAMM()
,SSARP::estimate_DR()
,SSARP::estimate_MS()
), or if using a custom dataframe, ensure that it has the following columns: areas, rate- npsi
The maximum number of breakpoints to estimate for model selection. Default: 1
Value
A list of 3 including: the summary output, the segmented regression object, and the aggregated dataframe used to create the plot
Examples
if (FALSE) { # \dontrun{
key <- get_key(query = "Anolis", rank = "genus")
dat <- get_data(key = key, limit = 100)
land <- find_land(occurrences = dat)
areas <- find_areas(occs = land)
occ_speciation <- estimate_BAMM(label_type = "epithet",
occurrences = areas,
edata = edata)
seg <- create_SpAR(occurrences = occ_speciation, npsi = 1)
summary <- seg[1]
} # }