Learn R Programming

VGAM (version 0.9-1)

posbernoulli.t: Positive Bernoulli Family Function with Time Effects

Description

Fits a GLM-like model to multiple Bernoulli responses where each row in the capture history matrix response has at least one success (capture). Sampling occasion effects are accommodated.

Usage

posbernoulli.t(link = "logit", parallel.t = FALSE, apply.parint = TRUE,
               iprob = NULL)

Arguments

link, iprob, parallel.t, apply.parint
See CommonVGAMffArguments for information. Setting parallel.t = TRUE results in the $M_0$ model.

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

    Upon fitting the extra slot has a (list) component called N.hat which is a point estimate of the population size $N$. And there is a component called SE.N.hat containing its standard error.

Warning

See posbernoulli.tb.

Details

This model (commonly known as $M_t$ in the capture--recapture literature) operates on a capture history matrix response of 0s and 1s. Each column is a sampling occasion where animals are potentially captured (e.g., a field trip), and each row is an individual animal. Capture is a 1, else a 0. No removal of animals from the population is made (closed population), e.g., no immigration or emigration. Each row of the response matrix has at least one capture.

A conditional likelihood is maximized using Fisher scoring. Each sampling occasion has a separate probability that is modelled here. The probabilities can be constrained to be equal by setting parallel.t = TRUE; then the results are effectively the same as posbinomial except the binomial constants are not included in the log-likelihood. If parallel.t = FALSE then each column should have at least one 1 and at least one 0.

It is well-known that some species of animals are affected by capture, e.g., trap-shy or trap-happy. This VGAM family function does not allow any behavioral effect to be modelled (posbernoulli.b does). However, it does allow covariates that are specific to each sampling occasion, e.g., through the xij argument. Ignoring capture history effects would mean posbinomial could be used by aggregating over the sampling occasions.

If there are no covariates that are specific to each occasion then the response matrix can be summed over the columns and posbinomial could be used by aggregating over the sampling occasions.

It is assumed that the animals are independent and that, for a given animal, each sampling occasion is independent. And animals do not lose their marks/tags, and all marks/tags are correctly recorded.

The number of linear/additive predictors is equal to the number of sampling occasions, i.e., $M = \tau$, say. The default link functions are $(logit \,p_{1},\ldots,logit \,p_{\tau})^T$ where $p$ denotes the probability.

The fitted value returned is of the same dimension as the response matrix.

References

Huggins, R. M. (1991) Some practical aspects of a conditional likelihood approach to capture experiments. Biometrics, 47, 725--732.

Huggins, R. M. and Hwang, W.-H. (2011) A review of the use of conditional likelihood in capture--recapture experiments. International Statistical Review, 79, 385--400.

Otis, D. L. and Burnham, K. P. and White, G. C. and Anderson, D. R. (1978) Statistical inference from capture data on closed animal populations, Wildlife Monographs, 62, 3--135.

See Also

posbernoulli.b, posbernoulli.tb, Perom, Huggins89.t1, vglm.control for xij, dposbern, rposbern, posbinomial.

Examples

Run this code
M_t <- vglm(cbind(y1, y2, y3, y4, y5, y6) ~ 1, trace = TRUE,
            posbernoulli.t, data = Perom)  # Has parallel.t = FALSE
coef(M_t, matrix = TRUE)
summary(M_t)


M_th.1 <- vglm(cbind(y1, y2, y3, y4, y5, y6) ~ sex + weight, trace = TRUE,
              posbernoulli.t, data = Perom)  # Has parallel.t = FALSE
summary(M_th.1)
head(depvar(M_th.1))  # Response capture history matrix
dim(depvar(M_th.1))

M_h.2 <- vglm(cbind(y1, y2, y3, y4, y5, y6) ~ sex + weight, trace = TRUE,
              posbernoulli.t(parallel.t = TRUE), data = Perom)
lrtest(M_th.1, M_h.2)  # Test the parallelism assumption
coef(M_h.2)
coef(M_h.2, matrix = TRUE)
constraints(M_h.2, matrix = TRUE)
summary(M_h.2)
head(model.matrix(M_h.2, type = "vlm"), 21)

M_h.2@extra$N.hat     # Estimate of the population size; should be about N
M_h.2@extra$SE.N.hat  # SE of the estimate of the population size
# An approximate 95 percent confidence interval:
round(M_h.2@extra$N.hat + c(-1, 1) * 1.96 *  M_h.2@extra$SE.N.hat, 1)


# Fit (effectively) the parallel model using posbinomial()
Perom <- transform(Perom, ysum = y1 + y2 + y3 + y4 + y5 + y6,
                          tau  = 6)
M_h.3 <- vglm(cbind(ysum, tau - ysum) ~ sex + weight,
              posbinomial, data = Perom, trace = TRUE)
max(abs(coef(M_h.2) - coef(M_h.3)))  # Should be zero
logLik(M_h.3) - logLik(M_h.2)  # Difference is due to the binomial constants

Run the code above in your browser using DataLab