Fit a well-known distribution to a species distribution.

fit_rac(x, ...)

# S3 method for class 'numeric'
fit_rac(
  x,
  distribution = c("lnorm", "lseries", "geom", "bstick"),
  ...,
  check_arguments = TRUE
)

# S3 method for class 'species_distribution'
fit_rac(
  x,
  distribution = c("lnorm", "lseries", "geom", "bstick"),
  ...,
  check_arguments = TRUE
)

Arguments

x

An object

...

Unused.

distribution

The distribution of species abundances. May be "lnorm" (log-normal), "lseries" (log-series), "geom" (geometric) or "bstick" (broken stick).

check_arguments

If TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Value

A tibble with the sites and the estimated distribution parameters.

Details

abundances can be used to fit rank-abundance curves (RAC) of classical distributions:

  • "lnorm" for log-normal Preston1948divent.

  • "lseries" for log-series Fisher1943divent.

  • "geom" for geometric Motomura1932divent.

  • "bstick" for broken stick MacArthur1957divent. It has no parameter, so the maximum abundance is returned.

References

Examples

fit_rac(paracou_6_abd, distribution = "lnorm")
#> # A tibble: 4 × 3
#>   site         mu sigma
#>   <chr>     <dbl> <dbl>
#> 1 subplot_1 0.848 1.03 
#> 2 subplot_2 0.802 0.981
#> 3 subplot_3 0.848 1.00 
#> 4 subplot_4 0.823 0.979