qqsad and qqrad methods | R Documentation |
Plots empirical quantiles vs corresponding theoretical values expected by a model for species abundances (SAD) or a model for species abundance ranks (RAD).
## S4 method for signature 'fitsad'
qqsad(x, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'numeric'
qqsad(x, sad, coef, trunc=NA, distr, plot=TRUE,
line=TRUE, ...)
## S4 method for signature 'fitrad'
qqrad(x, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'rad'
qqrad(x, rad, coef, trunc=NA, plot=TRUE, line=TRUE, ...)
## S4 method for signature 'numeric'
qqrad(x, rad, coef, trunc=NA, plot=TRUE, line=TRUE, ...)
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, |
distr |
Deprecated since sads 0.2.4. See |
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 |
signature(x = "fitsad", sad = "missing", coef =
"missing", trunc = "missing", distr = "missing", plot="ANY", line="ANY")
:
quantile-quantile plot for a fitted model of species abundances (a
fitsad-class
object). Only argument x
should be provided
signature(x = "numeric", sad = "character", coef =
"list", trunc = "ANY", distr = "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.
signature(x = "fitrad", rad = "missing", coef =
"missing", trunc = "missing", plot="ANY", line="ANY")
:
quantile-quantile plot for a fitted model of species abundances
ranks (a fitrad-class
object). Only argument x
should be provided
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.
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.
Paulo I Prado prado@ib.usp.br and Murilo Dantas Miranda.
Thas, O. 2010. Comparing distributions. Springer.
## 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))
qqsad(moths.ls)
qqsad(moths, sad="ls", coef=as.list(coef(moths.ls)))
qqsad(moths.ln)
qqsad(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) )
qqrad(ok.bs)
qqrad(okland, rad="rbs", coef=as.list(coef(ok.bs)))
qqrad(ok.gs)
qqrad(okland, rad="gs", coef=as.list(coef(ok.gs)))
par(mfrow=c(1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.