coverpred-methods | R Documentation |
coverpred
in Package sads ~~Creates an object of coverpred-class
with the
number of species in each abundance class predicted by a species
abundance distribution.
object |
an object of class |
sad |
character; root name of sad 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 if fitted distribution is truncated. |
breaks |
real vector; breakpoints of abundance classes. |
mids |
real vector; breakpoints of abundance classes. |
S |
integer; total number of species. |
signature(object = "fitsadC", sad = "missing",
coef = "missing", trunc = "missing", breaks = "missing",
mids = "missing", S = "missing")
number of species in each abundance class
predicted from a sads model fitted with function
fitsadC
.
signature(object = "histogram", sad = "character",
coef = "list", trunc = "ANY", breaks = "missing",
mids = "missing", S = "missing")
number of species in each abundance class
predicted from abundance distribution named by sad
with
parameters defined in coef
. Number of species S and
intervals of the abundance classes defined are given by
histogram
.
signature(object = "missing", sad = "character",
coef = "list", trunc = "ANY", breaks = "numeric",
mids = "ANY", S = "numeric")
number of species each abundance class
predicted from abundance distribution named by sad
with
parameters defined in coef
, number of species S defined
in S
. Abundance classes are defined by their breakpoints
(breaks
) or by their midpoints (mids
).
Paulo I. Prado prado@ib.usp.br
## Example of fitting a sad model to cover data
## Abundance classes: cover scale for plants
Lbrk <- c(0,1,3,5,15,25,35,45,55,65,75,85,95,100)
## To fit a sad model to cover data, data sould be in histogram format
grass.h <- hist(grasslands$mids, breaks = Lbrk, plot = FALSE)
## Fits a Pareto distribution to the histogram object
grass.p <- fitparetoC(grass.h)
## Values (densities, frequencies, relative frenquecies) predicted by the model for each size class
grass.p.pred <- coverpred(grass.p)
## Plot histogram of observed values in density scale
plot(grass.h)
## adds points for the predicted values (predicted densities)
points(grass.p.pred)
## Predicted values for the same data but other parameter values
grass.p.pred2 <- coverpred(grass.h, sad = "pareto", coef = list(shape = 1, scale = 0.5))
## Adds the new predicted values to the plot
points(grass.p.pred2, col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.