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 MM

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 gg

pMgX

posterior distribution of MM

crlev, alpha

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

Details

The functions postM and postM.ab return the posterior distributions of M(X,g)M|(X, g) and M(X,Ba,Bb)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 MM and a limit for truncating the prior to disregard implausibly large values of MM and make the calculations tractable in certain cases where they otherwise might not be. Use postM when gg is fixed and known; otherwise, use postM.ab when uncertainty in gg is characterized in a beta distribution with parameters BaBa and BbBb. 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>2X > 2, the integrated and non-integrated reference priors give virtually identical posteriors. However, the non-integrated priors assign infinite weight to m=0m = 0 and return a posterior of Pr(M=0X=0,g^)=1Pr(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 mm and Pr(M=m)Pr(M = m), respectively. The first column (m) must be sequential integers starting at m=0m = 0. The second column gives the probabilities associated with mm, which must be non-negative and sum to 1. The named priors ("IbinRef", "binRef", "IbetabinRef", and "betabinRef") are functions of mm and defined on m=0,1,2,...m=0,1,2,... without upper bound. However, the posteriors can only be calculated for a finite number of mm's up to a maximum of mmax, which is set by default to the smallest value of mm such that Pr(Xxm,g^)<0.0001Pr(X \leq x | m, \hat{g}) < 0.0001, where xx 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)M | (X, g) and M(X,Ba,Bb)M | (X, Ba, Bb), respectively. The functions calcMstar and MCI return MM^* 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]