| Title: | Models and Data Sets for the Study of Species-Area Relationships |
|---|---|
| Description: | Hierarchical models for the analysis of species-area relationships (SARs) by combining several data sets and covariates; with a global data set combining individual SAR studies; as described in Solymos and Lele (2012) <doi:10.1111/j.1466-8238.2011.00655.x>. |
| Authors: | Peter Solymos [aut, cre] (ORCID: <https://orcid.org/0000-0001-7337-1740>) |
| Maintainer: | Peter Solymos <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0-7 |
| Built: | 2026-05-09 07:09:00 UTC |
| Source: | https://github.com/psolymos/sharx |
Data sets and SAR, SARX, HSAR and HSARX models as described in Solymos and Lele (2012).
Peter Solymos
Maintainer: Peter Solymos <[email protected]>
Solymos, P. and Lele, S. R., 2012. Global pattern and local variation in species-area relationships. Global Ecology and Biogeography 21, 109–120.
Fit SAR, SARX, HSAR and HSARX models to data as described in Solymos and Lele (2012).
hsarx(formula, data, n.clones, cl = NULL, ...)hsarx(formula, data, n.clones, cl = NULL, ...)
formula |
Formula. |
data |
Data. |
n.clones |
Number of clones to be used. |
cl |
Cluster object for parallel computations. |
... |
Other arguments for MCMC. |
Fit SAR, SARX, HSAR and HSARX models to data as described in Solymos and Lele (2012).
An S4 object object of class 'hsarx'. It inherits from 'dcMle', and has additional slots for storing the data.
Peter Solymos
Solymos, P. and Lele, S. R., 2012. Global pattern and local variation in species-area relationships. Global Ecology and Biogeography 21, 109–120.
sardata for data sets.
## Not run: ## to reproduce results from Solymos and Lele (Table 1) data(sardata) DAT <- data.frame(sardata$islands, sardata$studies[match(sardata$islands$study, rownames(sardata$studies)),]) x <- hsarx(log(S+0.5) ~ log(A) | (taxon.group + island.type + abs(latitude) + I(log(extent)))^2 | study, DAT, n.clones=5, n.adapt=2000, n.update=3000, n.iter=1000) ## SAR DATS <- DAT[1:191,] (x1 <- hsarx(log(S+0.5) ~ log(A), DATS[DATS$study=="abbott1978bird",], n.clones=2)) ## SARX DATS$rnd <- rnorm(nrow(DATS), log(DATS$extent)) (x2 <- hsarx(log(S+0.5) ~ log(A) * rnd, DATS[DATS$study=="abbott1978bird",], n.clones=2)) ## HSAR (x3 <- hsarx(log(S+0.5) ~ log(A) | 1 | study, DATS, n.clones=2, n.iter=1000)) ## HSARX (x4 <- hsarx(log(S+0.5) ~ log(A) | abs(latitude) | study, DATS, n.clones=2, n.iter=1000)) ## End(Not run)## Not run: ## to reproduce results from Solymos and Lele (Table 1) data(sardata) DAT <- data.frame(sardata$islands, sardata$studies[match(sardata$islands$study, rownames(sardata$studies)),]) x <- hsarx(log(S+0.5) ~ log(A) | (taxon.group + island.type + abs(latitude) + I(log(extent)))^2 | study, DAT, n.clones=5, n.adapt=2000, n.update=3000, n.iter=1000) ## SAR DATS <- DAT[1:191,] (x1 <- hsarx(log(S+0.5) ~ log(A), DATS[DATS$study=="abbott1978bird",], n.clones=2)) ## SARX DATS$rnd <- rnorm(nrow(DATS), log(DATS$extent)) (x2 <- hsarx(log(S+0.5) ~ log(A) * rnd, DATS[DATS$study=="abbott1978bird",], n.clones=2)) ## HSAR (x3 <- hsarx(log(S+0.5) ~ log(A) | 1 | study, DATS, n.clones=2, n.iter=1000)) ## HSARX (x4 <- hsarx(log(S+0.5) ~ log(A) | abs(latitude) | study, DATS, n.clones=2, n.iter=1000)) ## End(Not run)
Data sets for the study of the species-area relationship
data(sardata)data(sardata)
A list of two data frames, see Details.
The element sardata$islands is a data frame with variables:
studyFactor, levels are the study identifiers.
idNumeric, island identifiers according to the original references.
SNumeric, number of species according to the original references.
ANumeric, area of the island in square kilometres, according to the original references.
The element sardata$studies is a data frame with variables:
studyFactor, levels are the study identifiers.
taxon.groupFactor, taxonomic group.
island.typeFactor, island type.
latitudeNumeric, middle band of latitude for the study calculated as (min + max) / 2, where min is the latitude close to the Equator, max is the latitude close to the poles.
extentNumeric, latitudinal extent of the study.
locationCharacter, location of the study.
References are in the files sardata.txt and sardata.bib
in the sharx library of R, labelled by study identifiers.
See examples on how to recall the files from the console.
## data structure data(sardata) str(sardata$islands) str(sardata$studies) ## references file.show(system.file(package = "sharx", "sardata.txt")) file.show(system.file(package = "sharx", "sardata.bib"))## data structure data(sardata) str(sardata$islands) str(sardata$studies) ## references file.show(system.file(package = "sharx", "sardata.txt")) file.show(system.file(package = "sharx", "sardata.bib"))
Fit a breakpoint regression model to data to find threshold for the small island effect (SIE) as described in Lomolino...
sie(S, A, method = "Nelder-Mead", ...) sieplot(x, add = FALSE, ...)sie(S, A, method = "Nelder-Mead", ...) sieplot(x, add = FALSE, ...)
S |
untransformed species richness, vector. |
A |
untransformed area, vector. |
x |
a fitted model object of class 'sie'. |
method |
optimization method. |
add |
logical, if lines should be added to existing plot ( |
... |
graphical arguments passed to |
sie fits the breakpoint regression to the data,
richness is log(S+0.5) transformed, area is log(A)
transformed before analysis.
There is a coef, summary, print
method for fitted objects.
sieplot plots the observed (transformed)
data and the fitted line.
An S4 object of class 'sie' inheriting from class 'mle'.
Peter Solymos
Lomolino, M. V., and M. D. Weiser. 2001. Towards a more general species-area relationship: diversity on all islands, great and small. Journal of Biogeography, 28, 431–445.
data(sardata) DAT <- sardata$islands[sardata$islands$study=="abbott1978plant",] (x <- sie(DAT$S, DAT$A)) coef(x) summary(x) sieplot(x)data(sardata) DAT <- sardata$islands[sardata$islands$study=="abbott1978plant",] (x <- sie(DAT$S, DAT$A)) coef(x) summary(x) sieplot(x)