Convert a multi-observer capture history table to a two-observer CR table
Source:R/callDensitySupport.R
mchToCR.RdExtracts a two-observer (table1, table2) capture-recapture capture history
table from a multi-observer source table by selecting only rows where at
least one of the two named observers detected the event, and renaming the
relevant columns to the _table1/_table2 suffixes expected by
the rest of the callDensity package. The verdict column from the
source is used as the ground-truth detection for table1.
Arguments
- d
A multi-observer capture history data.frame containing per-event columns
t0,tEnd,fLow,fHigh,SNR,signalRMSdB,noiseRMSdB,noiseDev,verdict, plus per-observer detection columns nameddetect_<observerSuffix>.- table1suffix
Character. Suffix of the observer columns to remap to the
_table1role (treated as ground truth viaverdict).- table2suffix
Character. Suffix of the observer columns to remap to the
_table2role (the detector being evaluated).
Value
A capture history data.frame in the two-observer (table1, table2)
format expected by cde, with time/season columns added by
capHistTimeSeason.
Deprecated
No current analysis needs this reduction. cde()'s only use of
capHistTab is falseDiscoveryRate(), which already accepts
gtColName/testColName directly against native
detect_observerN columns (once cde() forwards them –
see its own argument list). fitDetFun(modelType = 'vglm')
accepts any number of native-named observer columns directly via
yColNames, with no reduction to two required at all –
VGAM::posbernoulli.t is not limited to two occasions. This
function's body is unchanged and will keep working, kept only so the
published Common Ground and Beyond Counting Calls analysis scripts
keep reproducing exactly. New work should skip the 2-observer
reduction entirely and use chtToSNRinfo with a
observers vector of whatever length is needed.