ppsad and pprad methods {sads} | R Documentation |
Percentile-percentile plots for species-abundance and rank-abundance models
Description
Plots empirical percentiles vs corresponding theoretical values expected by a model for species abundances (SAD) or a model for species abundance ranks (RAD).
Usage
## S4 method for signature 'fitsad'
ppsad(x, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'numeric'
ppsad(x, sad, coef, trunc=NA, plot=TRUE,
line=TRUE, ...)
## S4 method for signature 'fitrad'
pprad(x, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'rad'
pprad(x, rad, coef, trunc=NA, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'numeric'
pprad(x, rad, coef, trunc=NA, plot=TRUE, line=TRUE, ...)
Arguments
x |
a numeric vector of abundances of
species or a fitted sad/rad model (object of |
sad , rad |
character; root name of sad or rad
distribution to calculate expected percentiles. See |
coef |
named list of numeric values; parameter values of the
distribution given in |
trunc |
non-negative integer, trunc > min(x); truncation point to fit a truncated distribution. |
plot |
logical; if 'TRUE' a percentile-percentile plot is produced. If not, only a data frame with theoretical and empirical values for percentiles of the data is invisibly returned. |
line |
logical; if 'TRUE' and |
... |
further arguments to be passed to the |
Methods
- ppsad
signature(x = "fitsad", sad = "missing", coef = "missing", trunc = "missing", plot="ANY", line="ANY")
: quantile-quantile plot for a fitted model of species abundances (afitsad-class
object). Only argumentx
should be provided.- ppsad
signature(x = "numeric", sad = "character", coef = "list", trunc = "ANY", plot="ANY", line="ANY")
: quantile-quantile plot of a numeric vector of abundances (x
) vs a species abundance distributions defined by the following arguments.- pprad
signature(x = "fitrad", rad = "missing", coef = "missing", trunc = "missing", plot="ANY", line="ANY")
: quantile-quantile plot for a fitted model of species abundances ranks (afitrad-class
object). Only argumentx
should be provided.- pprad
signature(x = "rad", rad = "character", coef = "list", trunc = "ANY", plot="ANY", line="ANY")
: quantile-quantile plot of a table of abundance ranks (x
) vs a species rank-abundance distribution defined by the following arguments.- pprad
signature(x = "numeric", rad = "character", coef = "list", trunc = "ANY", plot="ANY", line="ANY")
: quantile-quantile plot of a numeric vector of abundances (x
) vs a species rank-abundance distribution defined by the following arguments.
Author(s)
Paulo I Prado prado@ib.usp.br and Murilo Dantas Miranda.
References
Thas, O. 2010. Comparing distributions. Springer.
Examples
## An example with SADs
data(moths)
## fits log-series distribution to abundance data
moths.ls <- fitsad(moths, "ls")
## fits lognormal distribution truncated at 0.5
moths.ln <- fitsad(moths,"lnorm", trunc=0.5)
## Plots with the model object and with abundance vector
par(mfrow=c(2,2))
ppsad(moths.ls)
ppsad(moths, sad="ls", coef=as.list(coef(moths.ls)) )
ppsad(moths.ln)
ppsad(moths, sad="lnorm", coef=as.list(coef(moths.ln)), trunc=0.5)
par(mfrow=c(1,1))
## An example with RADs
data(okland)
## Fits broken-stick RAD model
ok.bs <- fitrad(okland, "rbs")
## Fits geometric series RAD model
ok.gs <- fitrad(okland, "gs")
## Plots with the model object and with the abundance vector
par( mfrow=c(2, 2) )
pprad(ok.bs)
pprad(okland, rad="rbs", coef=as.list(coef(ok.bs)))
pprad(ok.gs)
pprad(okland, rad="gs", coef=as.list(coef(ok.gs)))
par(mfrow=c(1,1))