Learn R Programming

spuRs (version 2.0.2)

fitDistances: Function to fit a model to seed transect distance/count data.

Description

This function uses maximum likelihood to fit a nominated probability density function to the data of a seedtrap transect holder.

Usage

fitDistances(x, family)

Arguments

x

an object of class transectHolder

family

the nominated distribution, which must be one of those distributions that can be fit by fitdistr of the MASS package.

Value

The function returns the parameter estimates for the nominated family.

References

Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.

See Also

fitdistr, trapTransect

Examples

Run this code
# NOT RUN {
library(MASS)
s1 <- trapTransect(distances = 1:4, seed.counts = c(4, 3, 2, 0))
allTraps <- transectHolder(s1, family="Weibull")
fitDistances(allTraps, "exponential")
# }

Run the code above in your browser using DataLab