extract.ch | R Documentation |
Creates a list with individual capture histories for birds from a CES object created by readces
for a survival analysis using mark.ces
extract.ch(cesdata, species=0, plots=NULL, late=FALSE, group=NA, exclude=NULL, min.n=1, min.yrs=3)
cesdata |
a CES object created by |
species |
a numeric Euring species code (including final zero which would indicate race) |
plots |
an object containing plot coverage data created by |
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 |
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).
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 |
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.
Rob Robinson
mark.ces
data(ukdata)
plots <- extract.coverage(ukdata)
robin.dat <- extract.ch(ukdata, species=10990, plots=plots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.