Learn R Programming

LeafAngle (version 1.2-1)

fitalldistributions: Fits all distributions

Description

Fits all distributions, returns an object of a special class. Prints nicely to show the statistic of the fit, and which one is the 'best fit'.

Usage

fitalldistributions(angles, fitmethod = "loglik", distributions = c('twoparbeta', 'ellipsoid', 'rotatedell', 'planophile', 'erectophile', 'plagiophile', 'extremophile', 'spherical', 'uniform'), ...)

Arguments

angles
Vector of angles (0 - 90 degrees)
fitmethod
'loglik' or 'chisq'.
distributions
By default, all implemented distributions.
...
Further parameters to ftheta (none as of now).

Value

Object of class angledistlist, which has print and plot methods.

Details

In most cases, the two-parameter beta distribution provides the best fit, because of greater flexibility.

References

Wang W.M., Li Z.L. & Su H.B. (2007). Comparison of leaf angle distribution functions: Effects on extinction coefficient and fraction of sunlit foliage. Agricultural and Forest Meteorology, 143, 106-122.

See Also

fitdistribution

Examples

Run this code

# Built-in example data
data(eteret)

# Fit all built-in distributions:
fit1 <- fitalldistributions(eteret)
fit1

# Plot one of the fitted distributions:
plot(fit1$allfits$planophile)

Run the code above in your browser using DataLab