nb_fct_simulation: Negative binomial frequency count table simulation

Description Usage Arguments Details Value Examples

View source: R/fct_functions.R

Description

Simulates a frequency count table according to the negative binomial model with the parameters input.

Usage

1
nb_fct_simulation(ccc, alpha, delta, r = 1)

Arguments

alpha

Shape parameter in the gamma distribution (our assumed mixing distribution)

delta

Rate parameter in the gamma distribution (our assumed

r

Replicates. If r is 1 then a single frequency count table is returned, otherwise a list of frequency count tables is returned. mixing distribution)

C

The true species richness

Details

Assuming a gamma mixed Poisson model, the number of times any taxa is observed follows a single draw from the negative binomial distribution. To simulate for C species, we make C draws.

Value

Returns a data frame in the form of a frequency count table

Examples

1
nb_fct_simulation(1000, 0.1, 0.001) #output is a frequency count table

statdivlab/rre documentation built on Nov. 5, 2019, 9:20 a.m.