Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

capture

Capture-recapture Models


Description

capture fits the Cormack capture-recapture model to n sample periods. Set n to the appropriate value and type eval(setup).

Usage

capture(z, n)

Arguments

z

A Poisson generalized linear model object.

n

The number of repeated observations.

Details

n <- periods # number of periods

eval(setup)

This produces the following variables -

p[i]: logit capture probabilities,

pbd: constant capture probability,

d[i]: death parameters,

b[i]: birth parameters,

pw: prior weights.

Then set up a Poisson model for log linear models:

z <- glm(y~model, family=poisson, weights=pw)

and call the function, capture.

If there is constant effort, then all estimates are correct. Otherwise, n[1], p[1], b[1], are correct only if there is no birth in period 1. n[s], p[s], are correct only if there is no death in the last period. phi[s-1] is correct only if effort is constant in (s-1, s). b[s-1] is correct only if n[s] and phi[s-1] both are.

Value

capture returns a matrix containing the estimates.

Author(s)

J.K. Lindsey

Examples

y <- c(0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,14,1,1,0,2,1,2,1,16,0,2,0,11,
	2,13,10,0)
n <- 5
eval(setup)
# closed population
print(z0 <- glm(y~p1+p2+p3+p4+p5, family=poisson, weights=pw))
# deaths and emigration only
print(z1 <- update(z0, .~.+d1+d2+d3))
# immigration only
print(z2 <- update(z1, .~.-d1-d2-d3+b2+b3+b4))
# deaths, emigration, and immigration
print(z3 <- update(z2, .~.+d1+d2+d3))
# add trap dependence
print(z4 <- update(z3, .~.+i2+i3))
# constant capture probability over the three middle periods
print(z5 <- glm(y~p1+pbd+p5+d1+d2+d3+b2+b3+b4, family=poisson, weights=pw))
# print out estimates
capture(z5, n)

repeated

Non-Normal Repeated Measurements Models

v1.1.2
GPL-2
Authors
Bruce Swihart [cre, aut], Jim Lindsey [aut] (Jim created this package, Bruce is maintaining the CRAN version), T.R. Ten Have [ctb, cph] (Wrote Logit_bin_nest.f90 (in binnest.f).), Richard Cook [ctb, cph] (Wrote calcs.c, calcs.h, calcs1.c, calcs1.h, calcs2.c, calcs2.h, calcs3.c, calcs3.h, calcs4.c, calcs4.h; defs.h; gaps.c, gaps.h.), Iain MacDonald [ctb, cph] (Wrote chidden.f, cphidden.f, hidden.f.), Walter Zucchini [ctb, cph] (Wrote chidden.f, cphidden.f, hidden.f.), Burton Garbow [ctb, cph] (Wrote eigen.f.), Euginia Zharichenko [ctb, cph] (Wrote logitord.f.)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.