calcAC {windAC} | R Documentation |
Calculate the area correction value(s) with confidence intervals
Description
Use a fitted carcass density distribution and data describing the search area to calculate area correction values and confidence intervals using a parametric bootstrap approach.
Usage
calcAC(
distribution,
paramVec,
varcovVec = NULL,
proportionSearchDF,
distanceCol,
proportionCol,
additionalCol = NULL,
nBoot = NULL,
truncBounds = NULL,
ciLevel = 0.9,
randomSeed = NULL,
...
)
Arguments
distribution |
Character indicating the distribution, passed to
|
paramVec |
Numeric vector for the parameters associated with distribution. Assumed to be in the same order as the function indicated by |
varcovVec |
Numeric vector for the variances and covariances for
|
proportionSearchDF |
Data frame with at least two columns: distance of the outer edge of an annulus from turbine and proportion of area searched within each annulus. |
distanceCol |
Character indicating the column name for the distance from turbine |
proportionCol |
Character indicating the column name for the proportion of area searched. |
additionalCol |
Character vector, default is NULL, indicating additional columns of how the area correction value should be calculated, see details and examples. |
nBoot |
Integer, indicating the number of parametric bootstrap replicates to use. Default is NULL, and not confidence intervals are produced. |
truncBounds |
Numeric, indicating bounds for the area
correction calculation, see details. Default is NULL, and the bounds are set to |
ciLevel |
Numeric, default is 0.9, desired confidence level for the bootstrap confidence interval. |
randomSeed |
Numeric value of random seed, default is NULL. |
... |
Additional arguments passed to |
Details
The function getDistanceProbability
is used to calculate
the probability (fraction of carcasses) in the intervals between distances in proportionSearchDF
.
The truncBounds
argument defaults to zero as a lower bound and infinity
as the upper bound. If a single value is provided, it is assumed as the upper
bound with zero as the lower bound. If two or more values are provided, the
max(truncBounds)
is the upper bound and min(truncBounds)
is the
lower bound.
If varcovVec
is NULL, then parametric bootstrapping is impossible and a confidence interval is not estimated. The
varcovVec
should be in such an order that correctly fills the lower
triangle including the diagonal. The first column is filled, then the second,
and so on. This forms the variance-covariance matrix for the parameters.
If nBoot
is greater than zero, a parametric bootstrap is done.
Bootstrap parameters are generated using the rmvnorm
function.
If the additionalCol argument is not NULL, separate area corrections are estimated for each unique value within the column.
Value
windAC
object
See Also
weightedLikelihood
weightedDistribution
getDistanceProbability
Examples
## proportion of area searched data
data(proportionAreaSearched)
## no parametric bootstrap
noBootstrap <- calcAC(distribution = 'gamma',
paramVec = c(2.483323, 0.02495139),
varcovVec = NULL,
proportionSearchDF = proportionAreaSearched,
distanceCol = 'distanceFromTurbine',
proportionCol = 'proportionAreaSearched',
additionalCol = 'plotType')
## with a parametric bootstrap
withBootstrap <- calcAC(distribution = 'gamma',
paramVec = c(2.483323, 0.02495139),
varcovVec = c(0.041189428, 0.0008825275, 2.118081e-05),
proportionSearchDF = proportionAreaSearched,
distanceCol = 'distanceFromTurbine',
proportionCol = 'proportionAreaSearched',
additionalCol = 'plotType',
nBoot = 10)