Learn R Programming

BayesGOF (version 4.0)

DS.missing.species: DS Missing Species

Description

Provides an expected number of new distinct observations, given a ratio of \(m\) additional samples to the \(n\) samples already observed.

Usage

DS.missing.species(DS.GF.obj, t.ratio, find.se = FALSE, se.reps = 50)

Arguments

DS.GF.obj

Object resulting from running DS.prior function on a data set; applies only to those of the Poisson family.

t.ratio

The extrapolation factor: \(\frac{m}{n}\).

find.se

If TRUE, will use bootstrap to find the standard error of the estimate; default is FALSE.

se.reps

The number of bootstrap iterations used in finding the standard error.

Value

ms.val

Expected number of new distinct observations in the user-provided t.ratio.

boot.se

The bootstrap standard error of the point estimate.

boot.ms.val

Vector of bootstrapped point estimates used in finding the standard error.

t.ratio

The user-provide ratio for the calculated expectation.

Details

Function utilizes DS priors in the following equation:$$E(t)=N \int_0^{\infty} e^{-\theta} \frac{1-e^{-\theta t}}{1 - e^{-\theta}} \pi(\theta) d \theta.$$ For more details on this equation, see Efron (2017).

References

Efron, B., 2017. "Bayes, Oracle Bayes, and Empirical Bayes," http://statweb.stanford.edu/~ckirby/brad/papers/2017BayesOBayesEBayes.pdf .

Mukhopadhyay, S. and Fletcher, D., 2018. "Bayesian Modeling via Goodness-of-Fit," Technical report, https://arxiv.org/abs/1802.00474 .

Examples

Run this code
# NOT RUN {
data(CorbBfly)
bfly.ds <- DS.prior(CorbBfly, max.m = 7, c(0.0899, 104.395), family = "Poisson")
bfly.ds.ms <- DS.missing.species(bfly.ds, t.ratio = .5)
bfly.ds.ms$ms.val
# }

Run the code above in your browser using DataLab