Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/estimateM.EoA.R
Estimate single-site or multiple-class M (=mortalities)
parameter of a classic Evidence of Absence (EoA)
using objective or informed priors. This routine differs from
function eoar
in that this routine does not allow covariates.
1 2 3 4 5 6 7 8 | estimateM.EoA(
X,
beta.params,
Mprior = "objective",
Mprior.mean,
Mprior.sd,
conf.level = 0.9
)
|
X |
Total number of carcasses found. |
beta.params |
A list or data frame containing at a minimum
components named |
Mprior |
Character string specifying the prior distribution for M.
|
Mprior.mean |
Mean of M prior when Mprior == "normal" or "gamma". |
Mprior.sd |
Standard deviation of M prior when Mprior == "normal" or "gamma". |
conf.level |
Confidence level for the confidence intervals on posterior estimates of M and g. |
This routine replicates the M estimates of the 'Single Year' and
'Multiple Classes' modules in package eoa
. To repeat either case,
input the composite g parameter's "a" and "b" parameters here, along
with the number of carcasses "X", and specify the "objective" prior. See
Examples.
List containing the following components.
M.est
: A data
frame containing the following:
M
= usual point estimate of M = median of M posterior
distribution.
M.mu
= mean of M posterior distribution
M.sd
= standard deviation of M posterior distribution
M.lo
= lower endpoint of a 100(conf.level)
interval for M.
M.hi
= upper endpoint of a 100(conf.level)
interval for M.
g
= mean of g posterior distribution
g.lo
= lower endpoint of a 100(conf.level)
interval for g. Note, this does not agree with the analogous number
from package eoa
because this comes from the posterior for g.
eoa
reports the quantile from the prior for g.
g.hi
= upper endpoint of a 100(conf.level)
interval for g. Note, this does not agree with the analogous number
from package eoa
because this comes from the posterior for g.
eoa
reports the quantile from the prior for g.
ci.level
= confidence level of the credible intervals (same
as input conf.level
).
M.margin
: the full posterior marginal distribution for M.
This is a data frame with the following columns
M
: value of M in its support.
pdf
: posterior probability mass function for M. Pr(M=m)
cdf
: posterior cummulative probability mass function for M.
Pr(M<=m).
prior.pdf
: prior probability mass function for M.
like.pdf
: likelihood probability mass function for M.
Note, all three of the pdf columns sum to 1.0, even in the
case of an improper prior. These columns can be plotted together
using the plot method for Mest
objects.
g.margin
: the full posterior marginal distribution for g.
This is a data frame with columns $g
, $pdf.g
, and $cdf.g
corresponding to g, probability of g, and probability of being less than or
equal to g, respectively. Note, sum(result$g.margin$pdf.g)
*diff(result$g.margin$g)[1] == 1.0
.
Trent McDonald
1 2 3 4 5 6 7 8 9 10 | g.params <- list(alpha=600, beta=1200)
X <- 5
m.ests <- estimateM.EoA(X,g.params)
print(m.ests$M.est)
m.ests <- estimateM.EoA(X, g.params, Mprior = "normal", Mprior.mean = 50, Mprior.sd = 30)
print(m.ests$M.est)
m.ests <- estimateM.EoA(X, g.params, Mprior = "gamma", Mprior.mean = 50, Mprior.sd = 30)
print(m.ests$M.est)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.