Title: | Wildlife Mortality Estimator for Low Fatality Rates and Imperfect Detection |
---|---|
Description: | Evidence of Absence software (EoA) is a user-friendly application for estimating bird and bat fatalities at wind farms and designing search protocols. The software is particularly useful in addressing whether the number of fatalities has exceeded a given threshold and what search parameters are needed to give assurance that thresholds were not exceeded. The models are applicable even when zero carcasses have been found in searches, following Huso et al. (2015) <doi:10.1890/14-0764.1>, Dalthorp et al. (2017) <doi:10.3133/ds1055>, and Dalthorp and Huso (2015) <doi:10.3133/ofr20151227>. |
Authors: | Daniel Dalthorp [aut, cre] |
Maintainer: | Daniel Dalthorp <[email protected]> |
License: | GPL-2 |
Version: | 1.0.0.2 |
Built: | 2024-11-25 15:00:07 UTC |
Source: | CRAN |
A template for carcass persistence data with interval-censored carcass persistence times
cpdata0
cpdata0
A matrix with 2 columns bracketing persistence times (in days since carcass placement) of each carcass:
the last time the carcass was observed
the first time the carcass was noted missing
A template for search schedule data
days0
days0
A numeric vector with the times when searches were conducted, with days[1] = 0:
numeric vector of search times
This package is designed to analyze searcher efficiency,
carcass persistence, search schedule, and carcass observation data for
the estimation of bird and bat mortality at wind and solar power
facilities. It is specially designed for analyses when few carcasses are
observed and detection probability is low. [It works fine for large counts as
well, but some estimators (GenEst
in particular) are more well-endowed
with a wider array of tools for analysis of large-count data.
est_pk0, est_cp0, est_g0
estimate searcher efficiency
(pk
), carcass persistence (cp
), and (g
) parameters
postM, postM.ab
estimate posterior
distribution of given estimated
and carcass count (
X
)
calcMstar, MCI
calculate
and credible interval for
sim_pk0, sim_cp0
simulate estimated
SE
and CP
parameters
GenEst::ppersist
calculate probability that a carcass that arrives
at an (unknown) uniform random time in an interval persists until a later,
specified time. This is the generalized statistic for a given
persistence distribution, arrival interval width, and search time.
fmmax, fmmax.ab
functions to calculate
a suitable maximum value to truncate improper prior distributions of
getab
function to extract MLE of pda
and
pdb
parameters from a persistence distribution
Carcass persistence is modeled as survival function
est_cp0(cpdata, dist)
est_cp0(cpdata, dist)
cpdata |
matrix of interval censored carcass persistence times |
dist |
Name of the persistence distribution family: Weibull, lognormal, loglogistic, or exponential |
uses survival
package to fit.
answer
Given a fitted pk model (from est_pk0
), a fitted
cp model (from est_cp0
or a survreg
object), and a
search schedule, estimate detection probability.
est_g0(pkmodel, cpmodel, days, a = NULL, v = NULL, ...)
est_g0(pkmodel, cpmodel, days, a = NULL, v = NULL, ...)
pkmodel |
fitted pk model (from |
cpmodel |
fitted cp model (from |
days |
vector of days since searches begin ( |
a |
fraction of carcasses arriving in the area searched |
v |
fraction of carcasses arriving in the period spanned by the monitoring |
... |
additional arguments (ignored) |
list of parameters for a beta distributions fit to the vectors of
for for the searched area within the period monitored
(
$BabRaw
), for the whole site within the period monitored
($Bab
), and for the whole site extrapolated to the whole year
($BabAnn
). In addition, the models and parameters that went into the
estimate are included as well (pkmodel, cpmodel, a, v
).
pkmodel <- est_pk0(pkdata = pkdata0) cpmodel <- est_cp0(cpdata = cpdata0, dist = "weibull") ghat <- est_g0(pkmodel = pkmodel, cpmodel = cpmodel, days = days0, a = 0.4, v = 0.75) summary(ghat)
pkmodel <- est_pk0(pkdata = pkdata0) cpmodel <- est_cp0(cpdata = cpdata0, dist = "weibull") ghat <- est_g0(pkmodel = pkmodel, cpmodel = cpmodel, days = days0, a = 0.4, v = 0.75) summary(ghat)
Searcher efficiency is modeled as a function of the number of times a carcass has been missed in previous searches and any number of covariates.
est_pk0(pkdata, kFixed = NULL, n.iter = 1000, ...)
est_pk0(pkdata, kFixed = NULL, n.iter = 1000, ...)
pkdata |
Search trial data entered in a list of N-vectors, $n and $y,
indicating the number of carcasses available and the number discovered in
searcher efficiency field trials in which carcasses were available for
discovery. [NOTE: In earlier versions of |
kFixed |
If trial carcassses are available for discovery for one search
and data are insufficient for estimating |
n.iter |
number of iterations to use in updating the JAGS model for
|
... |
Other parameters that may be used in called functions (esp.
|
The probability of finding a carcass that is present at the time of
search is p
on the first search after carcass arrival and is
assumed to decrease by a factor of k
each time the carcass is
missed in searches.
A list with an nsim x 2 matrix of simulated p
and k
values
the joint posterior for SE.
Improper priors need to be clipped in order to be usable.
fmmax
and fmmax.ab
find values of that are large enough
that the probability of exceeding is less than 0.0001 (depends on
and
).
fmmax(x, g) fmmax.ab(x, pBa, pBb)
fmmax(x, g) fmmax.ab(x, pBa, pBb)
x |
carcass count |
g |
overall carcass detection probability |
pBa , pBb
|
parameters for beta distribution characterizing estimated |
integer such that
survival
parameterization of
a fitted cp model (or survreg
object with exponential, weibull,
lognormal, or loglogistic distribution)retrieve EoA parameterization from survival
parameterization of
a fitted cp model (or survreg
object with exponential, weibull,
lognormal, or loglogistic distribution)
getab(cpmodel)
getab(cpmodel)
cpmodel |
fitted cp model (from |
2-vector of pda and pdb
Check validity of format of custom prior for M
MpriorOK(prior)
MpriorOK(prior)
prior |
a custom prior for M must be a matrix with columns for M and and associated probabalities P(M = m). The M column must begin at 0 and the probabilities must sum to 1. |
boolean. Is the prior formatted properly?
A template for summarized searcher efficiency data with the number of carcasses available and the number discovered for N = 12 search occasions
pkdata0
pkdata0
A list with 2 numeric N-vectors with numbers of:
searcher efficiency trial carcasses available
carcasses discovered
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.
postM(x, g, prior = "IbinRef", mmax = NA) postM.ab(x, Ba, Bb, prior = "IbinRef", mmax = NULL) calcMstar(pMgX, alpha) MCI(pMgX, crlev = 0.95)
postM(x, g, prior = "IbinRef", mmax = NA) postM.ab(x, Ba, Bb, prior = "IbinRef", mmax = NULL) calcMstar(pMgX, alpha) MCI(pMgX, crlev = 0.95)
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 ( |
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.
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.
Given a fitted cp model (survreg
object), generate random
pda
and pdb
parameters or random persistence times.
NOTE: This function is likely to move to call GenEst's rcp
in future.
This will not change the results, but the GenEst version is more nicely
coded and keeping some coherence among the models is helpful.
sim_cp0(cpmodel, nsim, option = "parms")
sim_cp0(cpmodel, nsim, option = "parms")
cpmodel |
Fitted cp model (( |
nsim |
Number of simulation draws |
option |
|
answer
Simple simulation
sim_pk0(pkmodel, nsim = 1000)
sim_pk0(pkmodel, nsim = 1000)
pkmodel |
A model returned from |
nsim |
Number of simulation reps for estimating the joint posterior
distribution of |
An nsim x 2 matrix of simulated p
and k
values
the joint posterior for SE.
Summary statistics for estimated g
## S3 method for class 'estg' summary(object, crlev = 0.95, ...)
## S3 method for class 'estg' summary(object, crlev = 0.95, ...)
object |
An |
crlev |
Credibility level of estimated CI to be returned |
... |
additional (optional) arguments passed to |
summary statistics for estimated g
. searched
is for the
fraction of carcasses falling in the searched area during the monitored
period, site
is area-adjusted to account for carcasses falling outside
the searched area, and full
is further extrapolated to the full year.
Summary statistics for estimated p and p parameters
## S3 method for class 'estpk' summary(object, crlev = 0.95, n.iter = 10000, ...)
## S3 method for class 'estpk' summary(object, crlev = 0.95, n.iter = 10000, ...)
object |
An |
crlev |
Credibility level of estimated CI to be returned |
n.iter |
Number of iterations of the JAGS model for estimating the joint
posterior distribution of |
... |
additional (optional) arguments passed to |
array of summary statistics for p
and k