coverpred-class: Class '"coverpred"' for predicted values for abundance...

coverpred-classR Documentation

Class "coverpred" for predicted values for abundance classes

Description

A list with values that define abundance classes and number and densities of species in each abundance, as predicted by a model of species abundance distribution.

Usage

## S4 method for signature 'coverpred'
points(x, y.scale = c("density", "Freq", "prob"), mid = TRUE, ...)

Arguments

x

an object of class coverpred

y.scale

"density" plots points in density scale, "Freq" plots frequencies and "prob" plots relative frequencies.

mid

logical; if TRUE x coordinates of abundances are set to the mid of each class, if FALSE x coordinates of abundances are the values of class upper limit.

...

further parameters to be passed to lines.

Objects from the Class

Objects can be created by calls of the form new("coverpred", ...), but most often by a call to coverpred.

Slots

.Data:

Object of class "list" with five vectors: breaks of abundance classes, midpoints of abundance classes, upper limit of abundance classes, predicted proportion of species in each abundance class, predicted number of species in each abundance class.

Extends

Class "list", directly. Class "oldClass", by class "list", distance 2. Class "vector", by class "list", distance 3.

Methods

points

signature(x = "coverpred"): adds frequency (or density) data contained in the object as points in a histogram.

Author(s)

Andre Chalom and Paulo I Prado prado@ib.usp.br

See Also

coverpred to get an object of the class from a histogran, fitsadC for fitting species abundance distributions to abundance data aggregated in classes.

Examples

## 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)

sads documentation built on June 22, 2024, 12:18 p.m.