R/compositionBiasCorrection.R
compositionBiasCorrection.Rd
When composition surveys are conducted there is a possibility of bias in calf cow ratios due to misidentifying young bulls as adult females and vice versa or missing calves.
compositionBiasCorrection(w, q, u, z, approx = F)
number. The apparent number of adult females per collared animal in composition survey.
number in 0, 1. Ratio of bulls to cows in composition survey groups.
number in 0, 1. Probability of misidentifying young bulls as adult females and vice versa in composition survey.
number in 0, <1. Probability of missing calves in composition survey.
logical. If TRUE approximate the uncertainty about the value of
the composition bias correction value (c) with the log-normal distribution
of c given all the supplied values of q
, u
, and z
. If FALSE the
composition bias correction value (c) is returned for each value of q
,
u
, and z
number or tibble. If approx = FALSE
a vector of composition bias
correction values (c) of the same length as q
, u
, and z
. If approx = TRUE
a tibble with on row per unique value of w
and columns w
, m
,
v
, sig2
, mu
representing w
, mean c
, variance of c
, and parameters for a
log-normal approximation of the distribution of c
.
We assume each group of animals in a calf:cow composition survey contains one or more collared adult females (\(T\)), and may also include: uncollared adult females misidentified as young bulls or unknown sex (\(U\)); correctly identified uncollared adult females (\(V\)); young bulls correctly identified as male or unknown sex (\(O\)); young bulls misidentified as uncollared adult females (\(P\)); observed calves (\(J\)); and unobserved calves (\(K\)). The apparent number of adult females in the group is \(T+V+P=Tw\), where \(w\) is a multiplier that defines the apparent number of adult females as a function of the number of collared animals. The ratio of young bulls to uncollared adult females in the group is: $$q = \frac{P+O}{U+V}$$. Assuming an equal probability \(u\) of misidentifying young bulls as adult females and vice versa, we get \(V=(U+V)(1-u)\) and \(P=(O+P)u\). Given a probability \(z\) of missing calves, we get \(J=(J+K)(1-z)\).
Our objective is to model the sex and bias-corrected recruitment rate \(X=\frac{J+K}{2(T+U+V)}\) as a function of the observed calf:cow ratio \(R=J/(T+V+P)\), the cow multiplier \(w\), the ratio of young bulls to adult females \(q\), and the misidentification probabilities \(u\) and \(z\). We start by solving for \(T+U+V\) as a function of \(q,w,u\) and \(T\). Recognize that \(P=Tw-T-V\), \(U+V=V/(1-u)\), and \(P+O=P/u\) to write \(q\) as $$q=\frac{Tw-T-V}{uV/(1-u)}.$$ Rearrange to get $$V=\frac{T(w-1)(1-u)}{qu+1-u}.$$ Recognize that \(U=Vu/(1-u)\) to write \(T+U+V\) as a function of \(q,w,u\) and \(T\): $$T+U+V=T\frac{qu+w-u}{qu+1-u}.$$ Recognize that the number of observed calves \(J\) is the product of the apparent recruitment rate and the apparent number of adult females \(J=RTw\), and that therefore \(J+K=RTw/(1-z)\) to rewrite the bias corrected recruitment rate \(X=\frac{J+K}{2(T+U+V)}\) as a function of \(w,u,z\) and \(R\): $$X=R\frac{w(1+qu-u)}{2(w+qu-u)(1-z)}.$$ For simplicity, we write \(X\) as a function of a bias correction term \(c\): $$c=\frac{w(1+qu-u)}{(w+qu-u)(1-z)}; X=cR/2.$$
Uncertainty about the value of the bias correction term \(c\) can be approximated with a Log-normal distribution. Given the apparent number of adult females per collared animal \(w\) the mean and standard deviation of \(\log{c}\) can be calculated for samples from the expected range of values of \(q\), \(u\) and \(z\).
Caribou demography functions:
caribouBayesianPM()
,
caribouPopGrowth()
,
demographicCoefficients()
,
demographicProjectionApp()
,
demographicRates()
,
getOutputTables()
,
getPriors()
,
getScenarioDefaults()
,
getSimsNational()
,
plotRes()
,
popGrowthTableJohnsonECCC
,
runScnSet()
,
simulateObservations()
# number or reps
nr <- 10
compositionBiasCorrection(w = 6,
q = runif(nr, 0, 0.6),
u = runif(nr, 0, 0.2),
z = runif(nr, 0, 0.2),
approx = FALSE)
#> [1] 1.1342417 1.0876774 1.0747310 1.0124026 1.0223626 1.1773906 1.0329474
#> [8] 0.9601172 0.9292761 1.0016297
compositionBiasCorrection(w = 6,
q = runif(nr, 0, 0.6),
u = runif(nr, 0, 0.2),
z = runif(nr, 0, 0.2),
approx = TRUE)
#> # A tibble: 1 × 5
#> w m v sig2 mu
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 6 1.09 0.00198 0.00167 0.0834