postM {eoa3} | 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 |
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 |
pMgX |
posterior distribution of |
crlev , alpha |
credibility level ( |
Details
The functions postM
and postM.ab
return the posterior
distributions of and
, 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 and a limit for truncating the
prior to disregard implausibly large values of
and make the
calculations tractable in certain cases where they otherwise might not be.
Use
postM
when is fixed and known; otherwise, use
postM.ab
when uncertainty in is characterized in a beta distribution with
parameters
and
. 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 , the integrated and
non-integrated reference priors give virtually identical posteriors. However,
the non-integrated priors assign infinite weight to
and return a
posterior of
, 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
and
, respectively. The first column (
m
) must be
sequential integers starting at . The second column gives the
probabilities associated with
, which must be non-negative and sum to 1.
The named priors (
"IbinRef"
, "binRef"
, "IbetabinRef"
,
and "betabinRef"
) are functions of and defined on
without upper bound. However, the posteriors can only be calculated for a
finite number of
's up to a maximum of
mmax
, which is set by
default to the smallest value of such that
, where
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 and
, respectively.
The functions
calcMstar
and MCI
return value and
credibility interval for the given posterior distribution,
pMgX
(which may be the return value of postM
or postM.ab
) and
value or credibility level.