Learn R Programming

⚠️There's a newer version (2.0.0) of this package.Take me there.

The 'sars' R Package

fit and compare Species-Area Relationship (SAR) models using multi-model inference

sars provides functionality to fit twenty SAR model using non-linear regression, and to calculate multi-model averaged curves using various information criteria. The software also provides easy to use functionality to plot multi-model SAR curves and to generate confidence intervals using bootstrapping. Additional SAR related functions include fitting the linear version of the power model and comparing parameters with the non-linear version, fitting the general dynamic model of island biogeography, and fitting the random placement model to a species abundance - site matrix.

As this is version 1.0.0 of the package, it is possible that there are some bugs in places. Please report any issues to us via GitHub.

Table of Contents

Installation

You can install the released version of sars from CRAN with:

install.packages("sars")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("txm676/sars")

Example usage

Basic usage of sars will result in using two types of functions:

To fit the power sar model (Arrhenius 1921) to the 'galapagos' (Preston 1962) data set:

fit_pow <- sar_power(data = galap)

Attempting to fit all 20 sar models to the 'galapagos' (Preston 1962) data set and get a multi-model SAR:

mm_galap <- sar_multi(data = galap)
#> 
#>  Now attempting to fit the 20 SAR models: 
#>  
#> --  multi_sars ---------------------------------------------------------------------------- multi-model SAR --
#> > power    : v
#> > powerR   : v
#> > epm1     : v
#> > epm2     : v
#> > p1       : v
#> > p2       : v
#> > expo     : v
#> > koba     : v
#> > mmf      : v
#> > monod    : v
#> > negexpo  : v
#> > chapman  : Warning: could not compute parameters statistics
#> > weibull3 : v
#> > asymp    : v
#> > ratio    : v
#> > gompertz : v
#> > weibull4 : v
#> > betap    : v
#> > heleg    : v
#> > linear   : v
#> 
#>  Model fitting completed - all models succesfully fitted. Now undertaking model validation checks. 
#>  Additional models will be excluded if necessary:
#> 
#> 4 models failed the residuals normality test and have been excluded from the multi SAR:
#> Extended Power model 1, Asymptotic regression, Cumulative Weibull 4 par., Linear model
#> 
#> 1 models have negative fitted values and have been excluded from the multi SAR:
#> Exponential
#> 15 remaining models used to construct the multi SAR: 
#>  Power, PowerR, Extended Power model 2, Persistence function 1, Persistence function 2, Kobayashi, MMF, Monod, Negative exponential, Chapman Richards, Cumulative Weibull 3 par., Rational function, Gompertz, Beta-P cumulative, Heleg(Logistic) 
#> --------------------------------------------------------------------------------------------------------------

Each of the 'fitted' objects have corresponding plot methods:

to fit the exponential SAR model (Gleason 1922) to the 'galapagos' data set and plot it

fit_expo <- sar_expo(data = galap)

plot(fit_expo)

to fit a multimodel SAR curve to the 'galapagos' data set and plot it

mm_galap <- suppressMessages(sar_multi(data = galap, verb = FALSE))

plot(mm_galap, pLeg = FALSE)

Troubleshoutting

If, despite the :heart: brought during the programming of this R :package: and writing of this documentation, you have difficulties to install or run sars, if you have questions about the procedures or calculations, or if you want to report bugs :beetle:, do not hesitate to connect with us on GitHub.

References

Arrhenius, Olof. 1921. “Species and Area.” The Journal of Ecology 9 (1). British Ecological Society: 95. doi:10.2307/2255763.

Gleason, Henry Allan. 1922. “On the Relation Between Species and Area.” Ecology 3 (2). Ecological Society of America: 158–62. doi:10.2307/1929150.

Preston, F. W. 1962. “The Canonical Distribution of Commonness and Rarity: Part I.” Ecology 43 (2). Ecological Society of America: 185. doi:10.2307/1931976.

Copy Link

Version

Install

install.packages('sars')

Monthly Downloads

274

Version

1.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Thomas Matthews

Last Published

August 13th, 2018

Functions in sars (1.0.0)

coleman

Fit Coleman's Random Placement Model
sar_asymp

Fit the Asymptotic regression model
sar_negexpo

Fit the Negative exponential model
sar_p1

Fit the Persistence function 1 model
niering

A SAR dataset describing the plants of the Kapingamarangi Atoll
sar_betap

Fit the Beta-P cumulative model
fit_collection

Create a Collection of SAR Model Fits
plot.coleman

Plot Model Fits for a 'coleman' Object
sar_heleg

Fit the Heleg(Logistic) model
sar_chapman

Fit the Chapman Richards model
sar_koba

Fit the Kobayashi model
sar_powerR

Fit the PowerR model
sar_linear

Fit the linear model
sar_p2

Fit the Persistence function 2 model
plot.multi

Plot Model Fits for a 'multi' Object
sar_power

Fit the Power model
sar_ratio

Fit the Rational function model
sar_mmf

Fit the MMF model
sar_expo

Fit the Exponential model
sar_gompertz

Fit the Gompertz model
aegean

A SAR dataset describing invertebrates on islands in the Aegean Sea, Greece
cole_sim

A simulated species-site abundance matrix with site areas
sar_epm1

Fit the Extended Power model 1 model
sar_epm2

Fit the Extended Power model 2 model
sar_monod

Fit the Monod model
sar_weibull3

Fit the Cumulative Weibull 3 par. model
sar_multi

Fit a multimodel SAR curve
sar_weibull4

Fit the Cumulative Weibull 4 par. model
sars-package

sars: Fit and compare species-area relationship models using multimodel inference
summary.sars

Summarising the results of the model fitting functions
galap

A SAR dataset describing the plants of the Galapagos Islands
gdm

Fit the General Dynamic Model of Island Biogeography
plot.sars

Plot Model Fits for a 'sars' Object
lin_pow

Fit the log-log version of the power model