| addTelemetry | R Documentation |
Animal locations determined by radiotelemetry can be used to augment
capture–recapture data. The procedure in secr is first to form a
capthist object containing the telemetry data and then to combine this
with true capture–recapture data (e.g. detections from hair-snag DNA)
in another capthist object. secr.fit automatically detects the
telemetry data in the new object.
Data from an arbitrary sample of telemetered animals combined with cue counts for unmarked animals are a special case that is discussed below ('Telemetry-calibrated cue counts').
addTelemetry (detectionCH, telemetryCH, type = c('concurrent','dependent',
'independent','marking'), collapsetelemetry = TRUE, verify = TRUE,
prefix = 'T')
xy2CH (CH, inflation = 1e-08)
telemetrytype (object) <- value
telemetrytype (object, ...)
detectionCH |
single-session capthist object, detector type ‘single’, ‘multi’, ‘proximity’ or ‘count’ |
telemetryCH |
single-session capthist object, detector type ‘telemetryonly’ |
type |
character (see Details) |
collapsetelemetry |
logical; if TRUE then telemetry occasions are collapsed to one |
verify |
logical; if TRUE then |
prefix |
character; pre-pended to ID of telemetry-only animals |
CH |
capthist object with telemetryxy attribute |
inflation |
numeric tolerance for polygon |
object |
secr traps object |
value |
character telemetry type replacement value |
... |
other arguments |
It is assumed that a number of animals have been radiotagged, and their telemetry data
(xy-coordinates) have been input to telemetryCH, perhaps using
read.capthist with detector = "telemetryonly" and fmt =
"XY", or with read.telemetry.
A new capthist object is built comprising all the detection
histories in detectionCH, plus empty (all-zero) histories for
every telemetered animal not in detectionCH. Telemetry is associated with new sampling occasions and a new detector (nominally at the same point as the first in detectionCH). The number of telemetry fixes of each animal is recorded in the relevant cell of the new capthist object (CH[i, s, K+1] for animal i and occasion s if there were K detectors in detectionCH).
The new sampling occasion(s) are assigned the detector type ‘telemetry’ in the
traps attribute of the output capthist object, and the traps attribute telemetrytype
is set to the value provided. The telemetry type may be “independent”
(no matching of individuals in captured and telemetered samples), “dependent”
(telemetered animals are a subset of captured animals), “concurrent” (histories
may be capture-only, telemetry-only or both capture and telemetry), or “marking”
(one detection history for each telemetered animal, and no others).
The telemetry locations are carried over from telemetryCH as attribute ‘xylist’ (each
component of xylist holds the coordinates of one animal; use
telemetryxy to extract).
The default behaviour of 'addTelemetry' is to automatically collapse all telemetry occasions into one. This is computationally more efficient than the alternative, but closes off some possible models.
xy2CH partly reverses addTelemetry: the location
information in the telemetryxy attribute is converted back to a capthist with
detector type ‘telemetry’.
A single-session capthist object with the same detector type as
detectionCH, but possibly with empty rows and an ‘telemetryxy’ attribute.
Telemetry type ‘marking’ is used for telemetry-calibrated cue counts: cameras (or other ‘count’ detectors) detect all animals, but identify only animals wearing radio-collars (the ‘marked’ animals). The collared animals also provide telemetry fixes. The data are assembled as follows.
detectionCH holds the identified sightings of collared animals on the sighting occasions, one history for each collared animal. Animals never sighted have all-zero histories; they are added by addTelemetry if they are present in telemetryCH. Detector type should be ‘count’.
telemetryCH holds the telemetry fixes. They are collapsed to a single telemetry occasion (the last), recorded at a notional extra detector.
The traps attribute markocc must be set (see markocc) with 0 for each sighting occasion and 1 for the telemetry occasion, e.g. c(0,0,0,0,0,1).
The counts of sightings of animals that were not identified as collared are added with addSightings: argument unmarked (attribute Tu, a K x S matrix of counts) for animals without collars and, optionally, nonID (attribute Tm) for collared animals that were seen but not identified.
Cues of collared animals recorded in Tm or as identified sightings are not counted again as unmarked cues; this is the principal difference from a model that treats the sightings of unmarked animals independently of those of marked animals. The probability that a sighting of a collared animal is identified (parameter pID, ‘q’) is estimated only if Tm is present.
A collar may not function throughout the survey. Use marked(capthist) <- (see marked) to specify when each animal could be recognised as marked (default is all occasions). Collared animals that were never detected contribute information only through their fixes and exposure.
The model is fitted by secr.fit with detectfn = "HHN" (or ‘HEX’). The activity centres of collared animals are integrated by summing over the mask or, usually faster, by Gauss-Hermite quadrature around the mean of the fixes (details = list(telemetryint = "GH"); see details). Density is estimated from the total sightings of unmarked animals after allowing for the collared animals' own sightings, so collars need not be deployed in proportion to density, but the collared animals should be representative of the population in their detectability (absolute density is biased low if collars favour animals that are individually more detectable). A density model such as D ~ x is possible if the mask has covariate x; coefficients are then estimated from the spatial pattern of unmarked sightings, and derived reports a cue-weighted density ‘Dcw’ (the mean of D(x) over the mask weighted by the expected number of cues from an animal centred at x) that is better determined than the mean density over the mask. A mask covariate named ‘marking’ gives a non-uniform prior for the activity centres of collared animals (default uniform).
secr.fit stops with an error for telemetry type ‘marking’ if any non-telemetry detector is not of type ‘count’.
With CL = TRUE the likelihood is conditional on the collared animals: it uses their identified sightings, their telemetry and, if present, Tm. The unmarked sightings Tu contribute only through their spatial pattern across detectors, and only when there is a (relative) density model such as D ~ x; the density level is not estimated. The detection parameters (including pID) and the density coefficients are those of the full likelihood, and the CL fit is a quick way to obtain them. Density requires the full likelihood (CL = FALSE); derived, derivedDcoef, derivedDsurface and region.N are not available for a CL fit of this type.
Sightings are overdispersed relative to the Poisson (the unmarked total is a sum over animals of correlated cues). The scale factor ‘chat’ is computed analytically from the fitted model: fit once, then secr.refit(fit, details = list(chatmethod = "analytic")). Simulation of chat (details$nsim) is not available for this telemetry type. See details.
Finite mixture models (e.g. model = list(sigma ~ h2, lambda0 ~ h2)) are supported when the class of every collared animal is known: the classes are given by a categorical individual covariate named in hcov, and an error is reported if any collared animal has an unknown class. The classes of the unmarked animals are unknown and are modelled as a latent mixture with population proportions pmix. By default pmix is estimated from the class composition of the collared animals, which assumes that collaring was independent of class. If that is doubtful (for example, sex-biased collaring) fix pmix at an external value with fixed = list(pmix = p), where for two classes p is the proportion in the second class.
Telemetry provides independent data on the location and presence of a sample of animals. These animals may be missed in the main sampling that gives rise to detectionCH i.e., they may have all-zero detection histories.
The ‘telemetry’ detector type is used for telemetry occasions in a combined dataset.
capthist,
make.telemetry,
read.telemetry,
telemetryxy,
telemetered,
addSightings,
marked,
markocc
# Telemetry type 'marking': simulated cameras count all animals, but only
# collared animals are identified
set.seed(1)
tr <- make.grid(nx = 9, ny = 9, spacing = 11, detector = "count")
msk <- make.mask(tr, buffer = 30, spacing = 5, type = "traprect")
pop <- sim.popn(D = 50, core = msk, buffer = 0)
collared <- 1:nrow(pop) %in% sample(nrow(pop), 15)
dp <- list(lambda0 = 1, sigma = 4)
# identified sightings of collared animals, and telemetry fixes
sightCH <- sim.capthist(tr, popn = subset(pop, collared), detectfn = "HHN",
detectpar = dp, noccasions = 5, renumber = FALSE)
teCH <- sim.capthist(make.telemetry(), popn = subset(pop, collared),
detectfn = "HHN", detectpar = dp, noccasions = 50, renumber = FALSE)
# counts at each detector and occasion of animals without collars (K x S matrix)
uCH <- sim.capthist(tr, popn = subset(pop, !collared), detectfn = "HHN",
detectpar = dp, noccasions = 5, renumber = FALSE)
Tu <- t(apply(uCH, 2:3, sum))
ch <- addTelemetry(sightCH, teCH, type = "marking")
markocc(traps(ch)) <- c(0,0,0,0,0,1) # 5 sighting occasions + telemetry
ch <- addSightings(ch, unmarked = Tu)
fit <- secr.fit(ch, mask = msk, detectfn = "HHN", trace = FALSE,
details = list(telemetryint = "GH"))
predict(fit)
# model-based overdispersion (chat) and cue-weighted density
fit2 <- secr.refit(fit, details = list(chatmethod = "analytic"), trace = FALSE)
predict(fit2)
derived(fit2)
## Not run:
# Generate some detection and telemetry data, combine them using
# addTelemetry, and perform analyses
# detectors
te <- make.telemetry()
tr <- make.grid(detector = "proximity")
# simulated population and 50% telemetry sample
totalpop <- sim.popn(tr, D = 20, buffer = 100)
tepop <- subset(totalpop, runif(nrow(totalpop)) < 0.5)
# simulated detection histories and telemetry
# the original animalID (renumber = FALSE) are needed for matching
trCH <- sim.capthist(tr, popn = totalpop, renumber = FALSE, detectfn = "HHN")
teCH <- sim.capthist(te, popn = tepop, renumber=FALSE, detectfn = "HHN",
detectpar = list(lambda0 = 3, sigma = 25))
combinedCH <- addTelemetry(trCH, teCH)
# summarise and display
summary(combinedCH)
plot(combinedCH, border = 150)
ncapt <- apply(combinedCH,1,sum)
points(totalpop[row.names(combinedCH)[ncapt==0],], pch = 1)
points(totalpop[row.names(combinedCH)[ncapt>0],], pch = 16)
# for later comparison of precision we must fix the habitat mask
mask <- make.mask(tr, buffer = 100)
fit.tr <- secr.fit(trCH, mask = mask, CL = TRUE, detectfn = "HHN") ## trapping alone
fit.te <- secr.fit(teCH, mask = mask, CL = TRUE, start = log(20), ## telemetry alone
detectfn = "HHN")
fit2 <- secr.fit(combinedCH, mask = mask, CL = TRUE, ## combined
detectfn = "HHN")
# improved precision when focus on realised population
# (compare CVD)
derived(fit.tr, distribution = "binomial")
derived(fit2, distribution = "binomial")
# may also use CL = FALSE
secr.fit(combinedCH, CL = FALSE, detectfn = "HHN", trace = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.