extract.ch: Get adult capture history data for an individual species

View source: R/extract.ch.R

extract.chR Documentation

Get adult capture history data for an individual species

Description

Creates a list with individual capture histories for birds from a CES object created by readces for a survival analysis using mark.ces

Usage

extract.ch(cesdata, species=0, plots=NULL, late=FALSE, group=NA, exclude=NULL, min.n=1, min.yrs=3)

Arguments

cesdata

a CES object created by readces

species

a numeric Euring species code (including final zero which would indicate race)

plots

an object containing plot coverage data created by extract.coverage.

late

should late visits be considered in site selection? In UK (at least) most adults are caught in first 6 visits, so defaults to FALSE (ie a site is included if, say, 4 of the first 6 visits are made). Set to TRUE to require late visits to be considered also, which will results in more site-year combinations being considered as 'missing'

group

a character string indicating a grouping variable for survival, such as 'sex'. Group levels should be alphabetic only (i.e. no digits (0-9) or symbols please; these confuse MARK).

exclude

one or more levels of 'group' to exclude, for example, '-' for unsexed birds

min.n

minimum total number of captures for a site to be included, may be useful with large datasets to aid convergence or memory allocation

min.yrs

minimum number of years for which a site has operated to be included

Details

Creates a '10' style capture hisory for each ringed bird (if a bird moves site it is treated as a new individual). Missing visits are preserved and handled by MARK. The additional capture within the first season is entered by shifting the first capture back a 'year' and entering a 1 subsequently (ie in the first actual year of capture) if the bird is recaught within that year, 0 otherwise. Birds initially caught as juveniles are included if they are subsequently caught as adults (with the juvenile captures removed).

Value

A list of six items

chdata

A data frame with columns: ring, ch and site

begin.time

A four digit integer indicaing the first year from which observations come

years

An integer indicating the number of years from which obserations come

group

a list consisting of name - character string indicating a grouping variable for survival or NA, and levels - a vector of the group levels

spp

Euring species code

spp.name

Name of the species in whichever language has been set by setceslang

Note

The matching of site names assumes that the order in whch they appear in x is the original one, avoid sorting this dataframe. If histories are extracted by group, the mark.ces will always estimate survival by group, to avoid this you will need to re-extract the data without a grouping variable.

Author(s)

Rob Robinson

See Also

mark.ces

Examples

data(ukdata)
plots <- extract.coverage(ukdata)
robin.dat <- extract.ch(ukdata, species=10990, plots=plots)

btorobrob/cesr documentation built on June 9, 2025, 5:39 a.m.