postM {dwp}R Documentation

Calculate posterior distribution of M and extract statistics (M* and CI)

Description

Calculation of the posterior distribution of total mortality (M) given the carcass count, overall detection probability (g), and prior distribtion; calculation of summary statistics from the posterior distribution of M, including M* and credibility intervals.

Usage

postM(x, g, prior = "IbinRef", mmax = NA)

postM.ab(x, Ba, Bb, prior = "IbinRef", mmax = NULL)

calcMstar(pMgX, alpha)

MCI(pMgX, crlev = 0.95)

Arguments

x

carcass count

g

overall carcass detection probability

prior

prior distribution of M

mmax

cutoff for prior of M (large max requires large computing resources but does not help in the estimation)

Ba, Bb

parameters for beta distribution characterizing estimated g

pMgX

posterior distribution of M

crlev, alpha

credibility level (1-\alpha) and its complement (\alpha)

Details

The functions postM and postM.ab return the posterior distributions of M|(X, g) and M|(X, Ba, Bb), respectively, where Ba and Bb are beta distribution parameters for the estimated detection probability. postM and postM.ab include options to to specify a prior distribution for M and a limit for truncating the prior to disregard implausibly large values of M and make the calculations tractable in certain cases where they otherwise might not be. Use postM when g is fixed and known; otherwise, use postM.ab when uncertainty in g is characterized in a beta distribution with parameters Ba and Bb. The non-informative, integrated reference prior for binomial random variables is the default (prior = "IbinRef"). Other options include "binRef", "IbetabinRef", and "betabinRef", which are the non-integrated and integrated forms of the binomial and betabinomial reference priors (Berger et al., 2012). For X > 2, the integrated and non-integrated reference priors give virtually identical posteriors. However, the non-integrated priors assign infinite weight to m = 0 and return a posterior of Pr(M = 0| X = 0, \hat{g}) = 1, implying absolute certainty that the total number of fatalities was 0 if no carcasses were observed. In addition, a uniform prior may be specified by prior = "uniform". Alternatively, a custom prior may be given as a 2-dimensional array with columns for m and Pr(M = m), respectively. The first column (m) must be sequential integers starting at m = 0. The second column gives the probabilities associated with m, which must be non-negative and sum to 1. The named priors ("IbinRef", "binRef", "IbetabinRef", and "betabinRef") are functions of m and defined on m=0,1,2,... without upper bound. However, the posteriors can only be calculated for a finite number of m's up to a maximum of mmax, which is set by default to the smallest value of m such that Pr(X \leq x | m, \hat{g}) < 0.0001, where x is the observed carcass count, or, alternatively, mmax may be specified by the user.

Value

The functions postM and postM.ab return the posterior distributions of M | (X, g) and M | (X, Ba, Bb), respectively. The functions calcMstar and MCI return M^* value and credibility interval for the given posterior distribution, pMgX (which may be the return value of postM or postM.ab) and \alpha value or credibility level.


[Package dwp version 1.1 Index]