meteSAR {meteR} | R Documentation |
Compute METE species area relationship (SAR)
Description
Uses raw data or state variables to calculate METE SAR and EAR (endemics area relatiohsip) as well as compute the observed SAR or EAR from data, if provided
Usage
meteSAR(spp, abund, row, col, x, y, S0 = NULL, N0 = NULL, Amin, A0,
upscale = FALSE, EAR = FALSE)
Arguments
spp |
vector of species identities |
abund |
numberic vector abundances associated with each record |
row |
identity of row in a gridded landscape associated with each record, or desired number of rows to divide the landcape into |
col |
identity of column in a gridded landscape associated with each recod, or desired number of columns to divide the landcape into |
x |
the x-coordinate of an individual if recorded |
y |
the y-coordinate of an individual if recorded |
S0 |
total number of species |
N0 |
total abundance |
Amin |
the smallest area, either the anchor area for upscaling or the desired area to downscale to |
A0 |
the largest area, either the area to upscale to or the total area from which to downscale |
upscale |
logical, should upscaling or downscaling be carried out |
EAR |
logical, should the EAR or SAR be computed |
Details
Currently only doublings of area are supported. Predictions
and comparison to data can be made via several options. If spp
and abund
are not provided then only theoretical predictions
are returned without emperical SAR or EAR results. In this case areas
can either be specified by providing Amin
and A0
from
which a vector of doubling areas is computed, or my providing row
,
col
and A0
in which case row
and col
are
taken to be the number of desired rows and columns used to construct
a grid across the landscape. If data are provided in the form of
spp
and abund
then either row
and col
or
x
and y
must be provided for each data entry (i.e. the
length of row
and col
or x
and y
must equal
the length of spp
and abund
). If x
and y
are provided then the landscape is gridded either by specifying
Amin
(the size of the smallest grid cell) or by providing the
number or desired rows and columns via the row
and col
arguments.
SARs and EARs can be predicted either interatively or non-iteratively.
In the non-iterative case the SAD and SSAD (which are used to calculate
the SAR or EAR prediction) are derived from state variables at one
anchor scale. In the iterative approach state variables are re-calculated
at each scale. Currently downscaling and upscaling are done differently (
downscaling is only implemented in the non-iterative approach, whereas
upscaling is only implemented in the iterative approach). The reason is
largely historical (downscaling as originally done non-iteratively while
upscaling was first proposed in an iterative framework). Future implementations
in meteR
will allow for both iterative and non-iterative approaches
to upscaling and downscaling. While iterative and non-iterative methods lead to
slightly different predictions these are small in comparison to typical ranges of
state variables (see Harte 2011).
Value
an object of class meteRelat
with elements
pred
predicted relationship; an object of class
sar
obs
observed relationship; an object of class
sar
Author(s)
Andy Rominger <ajrominger@gmail.com>, Cory Merow
References
Harte, J. 2011. Maximum entropy and ecology: a theory of abundance, distribution, and energetics. Oxford University Press.
See Also
sad, meteESF, metePi
Examples
## Not run:
data(anbo)
## using row and col from anbo dataset
anbo.sar1 <- meteSAR(anbo$spp, anbo$count, anbo$row, anbo$col, Amin=1, A0=16)
plot(anbo.sar1)
## using simulated x, y data
anbo.sar2 <- meteSAR(anbo$spp, anbo$count, x=anbo$x, y=anbo$y, row=4, col=4)
plot(anbo.sar2)
## using just state variable
thr.sar <- meteSAR(Amin=1, A0=16, S0=50, N0=500)
## End(Not run)