plotsample_est: Plot sampling estimation

View source: R/plotsample_est.R

plotsample_estR Documentation

Plot sampling estimation

Description

Estimates abundance as n/p, where n is total count and p inclusion probability. Also returns a confidence interval, estimated standard error and CV, using one of four possible methods (see argument method.)

Usage

plotsample_est(
  n,
  p,
  alpha = 0.05,
  method = "lognormal",
  dbn = "binomial",
  B = 999,
  Nmult = 3
)

Arguments

n

Vector of counts in plots

p

Proportion of survey region covered by plots

alpha

The significance level (defaults to alpha=0.05 for 95% level)

method

If 'normal', the estimator is assumed to be normally distributed with variance calculated assuming the distribution given by dbn, if 'lognormal', the estimator is assumed to be lognormally distributed with variance calculated assuming the distribution given by dbn, if 'exact', the estimator is assumed to have the parameteric distribution specified by dbn. If 'percentile' and dbn is 'bootstrap', the percentile method is used.

dbn

If 'binomial', the count is assumed to be binomially distributed (for variance estimation, and if method is 'exact', then for confidence interval estimation too. If 'binomial', the count is assumed to be binomially distributed (for variance estimation, and if method is 'exact', then for confidence interval estimation too. If 'bootstrap' the variance is obtained by nonparametric bootstrap of the plots, and the confidence interval is obtained using this and assuming that the estimator is normally distributed (if method is 'bionomial'), or assuming that the estimator is Poisson distributed (if method is 'poisson'), or making no distributional assumption and using the pecentile method (if method is 'percentile')

B

Number of bootstrap replicates.

Nmult

multiple of estimate beyond which probability of getting observed data is assumed to be zero (just for computational covenience when calculating exact CI).

Value

The function returns a list with the following elements:

  • $Nhat : Estimated abundance.

  • $se.Nhat : Standard error of the estimator.

  • $cv.Nhat : Coefficient of variance of the estimator.

  • $ci.Nhat: Confidence interval.

Author(s)

David Borchers

Examples

plotsample_est(n=10, p=0.5, method='lognormal')

chrissuthy/statsecol documentation built on Feb. 14, 2024, 3:53 p.m.