Encounter-rate weight per species x zone, from the occurrence rule's counts
Source:R/encounter_weight.R
encounter_weight.Rdw = min(1, rate_zone / rate_reference), where rate_zone = the species' record rate in the zone
(occupied / searched 0.5-degree blocks, occurrence_rule()'s rate) and rate_reference = its rate
over the baseline (occurrence_rule()'s p_core: the other zones of the set, or the whole range).
The weight is a MULTIPLIER on the merged value inside the zone. The tiers Tim White asked for apply
in this order:
dropped(the gate):w = 0– zero detections under adequate effort are a gate, not a weight; the rows are also in the exclusion table, so the weight is redundant there by design.an override (
protected,narrow range) orunsearched:w = 1– unsampled is unknown, not rare; critical habitat is never downweighted.no reference (
p_coreis 0 orNA: the species has no record anywhere else):w = 1(the pooled fallback – nothing to compare against, so nothing is taken away).otherwise
w = max(floor, min(1, rate / p_core)); a zone at or above its reference rate is never UPweighted (cap at 1).
Arguments
- x
a data frame as
occurrence_rule()returns:rate,p_core,verdict,override(andmdl_key,zone_key, carried through).- floor
numeric in 0, 1; the smallest weight a kept zone can take (default 0: the rate ratio as measured).
Value
x with a w column (numeric in floor, 1, 0 where dropped) and w_reason
(dropped | override | unsearched | no reference | rate ratio | at reference).
Examples
x <- data.frame(mdl_key = "a", zone_key = c("A", "B", "C", "D"),
rate = c(0.1, 0.5, 0, 0.02), p_core = c(0.4, 0.4, 0.4, 0.4),
verdict = c("kept", "kept", "unsearched", "dropped"), override = NA)
encounter_weight(x)$w # 0.25, 1, 1, 0
#> [1] 0.25 1.00 1.00 0.00