stratify: Stratify Capture-Recapture Data

stratifyR Documentation

Stratify Capture-Recapture Data

Description

Arrange existing capthist data in stratified form.

Usage

stratify(..., intervals = NULL, MoreArgs = list(), covariate = NULL, bytraps = FALSE)

Arguments

...

one or more multi-session capthist objects, or a list of such objects

intervals

list of intervals vectors, one for each multi-session capthist in ...

MoreArgs

list of other arguments passed to join

covariate

character; name of individual or trap covariate to stratify by

bytraps

logical; if TRUE then covariate is interpreted as the name of a detector covariate

Details

The argument ... may be

  1. a list of single-session capthist, one for each stratum (sessions already joined)

  2. a list of multi-session capthist, one for each stratum (sessions will be joined)

  3. one single-session capthist, to split by covariate (sessions already joined)

  4. one multi-session capthist, to be joined as one then split by covariate

Cases 1 and 2 result in one stratum for each component of the input list. Cases 3 and 4 result in one stratum for each level of covariate.

The result in Case 1 is identical to MS.capthist(...).

The argument intervals refers to the intervals between primary sessions before joining (Cases 2,4 only) (see Examples).

MoreArgs may include the arguments remove.dupl.sites, tol, sites.by.name or drop.sites of join; these otherwise take their default values.

Value

Multi-stratum (multi-session) capthist object for which each component has been ‘join’ed.

See Also

join, MS.capthist, openCR.fit, strata

Examples


# FebpossumCH comprises 9 annual February sessions.
# The individual covariate 'sex' takes values 'F' and 'M', resulting in two strata.
# 'intervals' can be omitted as the default does the same job.
ch <- stratify(FebpossumCH, covariate = 'sex', intervals = rep(list(rep(1,8)),2))
summary(ch, terse = TRUE)


openCR documentation built on Sept. 25, 2022, 5:06 p.m.