posteriorN: Posterior distribution of the number of fatalities based on...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/posteriorN.R

Description

This function gives the posterior distribution of the number of fatalities based on the number of carcasses counted during carcass searches and the probability of detecting a carcass. The function uses the theorem of Bayes.

Usage

1
2
posteriorN(p, nf = 0, maxN = 1000, ci.int = 0.95, plot = TRUE,
              dist = FALSE)

Arguments

p

probability of finding a carcass. This probability can be obtained by e.g. pkorner, phuso or perickson.

nf

the number of carcasses found

maxN

the maximal number of fatalities for which a posterior densitiy should be given

ci.int

length of the credible interval that should be given. Default is 0.95.

plot

if TRUE the posterior distribution is plotted

dist

if TRUE the posterior density is given for all elements in 0:maxN

Value

interval

vector of length 2 containing the lower and upper limit of the interval specified in the argument ci.int

expected

median of the posterior distribution of the number of fatalities

HT.estimate

Horvitz-Thompson estimate, i.e. nf/p

pN

posterior density for each element in 0:maxN number of fatalities

Note

This function cannot handle larger numbers, e.g. maxN > 2000 is not possible. The function does not take into account the uncertainty of the estimate for the detection probability. If you want do account for this uncertainty, use the function estimateN.

Author(s)

Fraenzi Korner-Nievergelt

References

Korner-Nievergelt F, Korner-Nievergelt P, Behr O, Niermann I, Brinkmann R, Hellriegel B (2011) A new method to determine bird and bat fatality at wind energy turbines from carcass searches. Wildlife Biology 17: 350-363

See Also

estimateN

Examples

1
posteriorN(p=0.5, nf=3, dist=TRUE, maxN=15)

Example output

Loading required package: lme4
Loading required package: Matrix
Loading required package: survival
$interval
[1]  3 13

$expected
[1] 6

$HT.estimate
[1] 6

$pN
 [1] 0.000000000 0.000000000 0.000000000 0.063171856 0.126343713 0.157929641
 [7] 0.157929641 0.138188436 0.110550749 0.082913062 0.059223615 0.040716236
[13] 0.027144157 0.017643702 0.011227810 0.007017382

carcass documentation built on May 2, 2019, 2:42 a.m.