Learn R Programming

tabula (version 1.7.0)

simulate: Measure Diversity by Comparing to Simulated Assemblages

Description

Measure Diversity by Comparing to Simulated Assemblages

Usage

# S4 method for DiversityIndex
simulate(
  object,
  n = 1000,
  step = 1,
  interval = c("percentiles", "student", "normal"),
  level = 0.8,
  progress = getOption("tabula.progress")
)

Value

Returns a DiversityIndex object.

Arguments

object

A DiversityIndex object.

n

A non-negative integer giving the number of bootstrap replications.

step

An integer giving the increment of the sample size.

interval

A character string giving the type of confidence interval to be returned. It must be one "percentiles" (sample quantiles, as described in Kintigh 1984; the default), "student" or "normal". Any unambiguous substring can be given.

level

A length-one numeric vector giving the confidence level.

progress

A logical scalar: should a progress bar be displayed?

Author

N. Frerebeau

References

Kintigh, K. W. (1984). Measuring Archaeological Diversity by Comparison with Simulated Assemblages. American Antiquity, 49(1), 44-54. tools:::Rd_expr_doi("10.2307/280511").

See Also

plot_diversity(), resample()

Other diversity measures: heterogeneity(), occurrence(), plot_diversity, rarefaction(), richness(), similarity(), turnover()

Examples

Run this code
# \donttest{
## Coerce data to a count matrix
data("chevelon", package = "folio")

## Assemblage diversity size comparison
## Warning: this may take a few seconds!
h <- heterogeneity(chevelon, method = "shannon")
h_sim <- simulate(h)
plot(h_sim)

r <- richness(chevelon, method = "count")
r_sim <- simulate(r)
plot(r_sim)
# }

Run the code above in your browser using DataLab