Package 'sharx'

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
Maintainer: Peter Solymos <[email protected]>
License: GPL-2
Version: 1.0-6
Built: 2024-11-19 06:47:00 UTC
Source: CRAN

Help Index


Models and Data Sets for the Study of the Species-Area Relationships

Description

Data sets and SAR, SARX, HSAR and HSARX models as described in Solymos and Lele (2012).

Details

See sardata and hsarx

Author(s)

Peter Solymos

Maintainer: Peter Solymos <[email protected]>

References

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

Description

Fit SAR, SARX, HSAR and HSARX models to data as described in Solymos and Lele (2012).

Usage

hsarx(formula, data, n.clones, cl = NULL, ...)

Arguments

formula

Formula.

data

Data.

n.clones

Number of clones to be used.

cl

Cluster object for parallel computations.

...

Other arguments for MCMC.

Details

Fit SAR, SARX, HSAR and HSARX models to data as described in Solymos and Lele (2012).

Value

An S4 object object of class 'hsarx'. It inherits from 'dcMle', and has additional slots for storing the data.

Author(s)

Peter Solymos

References

Solymos, P. and Lele, S. R., 2012. Global pattern and local variation in species-area relationships. Global Ecology and Biogeography 21, 109–120.

See Also

sardata for data sets.

Examples

## 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

Description

Data sets for the study of the species-area relationship

Usage

data(sardata)

Format

A list of two data frames, see Details.

Details

The element sardata$islands is a data frame with variables:

study

Factor, levels are the study identifiers.

id

Numeric, island identifiers according to the original references.

S

Numeric, number of species according to the original references.

A

Numeric, area of the island in square kilometres, according to the original references.

The element sardata$studies is a data frame with variables:

study

Factor, levels are the study identifiers.

taxon.group

Factor, taxonomic group.

island.type

Factor, island type.

latitude

Numeric, 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.

extent

Numeric, latitudinal extent of the study.

location

Character, location of the study.

References

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.

Examples

## 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"))

Small Island Effect (SIE) via Breakpoint Regression

Description

Fit a breakpoint regression model to data to find threshold for the small island effect (SIE) as described in Lomolino...

Usage

sie(S, A, method = "Nelder-Mead", ...)
sieplot(x, add = FALSE, ...)

Arguments

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 (TRUE), or a new plot is to be drawn (FALSE, default).

...

graphical arguments passed to plot.

Details

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.

Value

An S4 object of class 'sie' inheriting from class 'mle'.

Author(s)

Peter Solymos

References

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.

Examples

data(sardata)
DAT <- sardata$islands[sardata$islands$study=="abbott1978plant",]
(x <- sie(DAT$S, DAT$A))
coef(x)
summary(x)
sieplot(x)