Learn R Programming

Rcapture (version 1.2-1)

closedp.bc: Bias Correction for Closed Population Loglinear Models

Description

This function applies a bias correction to the abundance estimations obtained by closed population models.

Usage

closedp.bc(X, dfreq=FALSE, dtype=c("hist","nbcap"), t, t0=t,
           m=c("M0","Mt","Mh","Mth","Mb","Mbh"), 
           h=c("Chao","Poisson","Darroch","Gamma"), theta=2)

## S3 method for class 'closedp.bc':
print(x, \dots)

Arguments

X
The matrix of the observed capture histories (see Rcapture-package for a description of the accepted formats).
dfreq
A logical. By default FALSE, which means that X has one row per unit. If TRUE, it indicates that the matrix X contains frequencies in its last column.
dtype
A characters string, either "hist" or "nbcap", to specify the type of data. "hist", the default, means that X contains complete observed capture histories. "nbcap" means that X contains numbers of captures (see
t
Requested only if dtype="nbcap". A numeric specifying the total number of capture occasions in the experiment.
t0
A numeric. Models are fitted considering only the frequencies of units captured 1 to t0 times. By default t0=t.
m
A character string indicating the model to fit, either "M0"=M0 model, "Mt"=Mt model, "Mh"=Mh model, "Mth"=Mth model, "Mb"=Mb model, "Mbh"=Mbh model.
h
A character string ("Chao", "Poisson", "Darroch" or "Gamma") or a numerical R function specifying the form of the column for heterogeneity in the design matrix. "Chao" represents Chao's model, "Poisson" represents the function $f(k)=theta^k-1
theta
The value of the parameter for a Poisson or Gamma model.
x
An object, produced by the closedp.bc function, to print.
...
Further arguments to be passed to print.default.

Value

  • nThe number of captured units
  • resultsA table containing, for every fitted model, the corrected population size estimation and its standard error.
  • convergeA logical vector indicating whether or not the fitted models converged.

Details

The abundance estimate for the Mt model when t=2 has Chapman bias correction and a standard error derived from Seber and Wittes variance estimate. For t>2, closedp.bc() implements the bias correction of Rivest and Levesque (2001). The estimate for N and its variance are calculated by solving an estimating equation as proposed in Seber (1982), not by fitting a Poisson regression. This approach works for large values of t. For other models, the bias correction is done through frequency modifications in Poisson regression as described in Rivest and Levesque (2001). The variances calculated with the modified frequencies are less biased than the standard ones, but they can overestimate the mean squared errors, especially when the data is sparse. This function works with fairly large data set, except if an "Mth" model is requested. In this case, only heterogeneity of the form "Chao", "Poisson" with theta=2 or "Darroch" is accepted.

References

Baillargeon, S. and Rivest, L.P. (2007) Rcapture: Loglinear models for capture-recapture in R. Journal of Statistical Software, 19(5), http://www.jstatsoft.org/v19/i05. Rivest, L.P. and Levesque, T. (2001) Improved log-linear model estimators of abundance in capture-recapture experiments. Canadian Journal of Statistics, 29, 555--572. Seber, G.A.F. (1982) The Estimation of Animal Abundance and Related Parameters, 2nd edition, New York: Macmillan.

See Also

closedp

Examples

Run this code
data(mvole)
period3<-mvole[,11:15]
closedp.bc(period3,m="Mh",h="Darroch")
closedp.bc(period3,m="Mh",h="Gamma",theta=3.5)

data(BBS2001)
closedp.bc(BBS2001,dfreq=TRUE,dtype="nbcap",t=50,t0=20,
           m="Mh",h="Gamma",theta=3.5)

# Seber (1982) p.107
# When there is 2 capture occasions, only models M0 and Mt can be fitted
X <- matrix(c(1,1,167,1,0,781,0,1,254),byrow=TRUE,ncol=3)
closedp.bc(X,dfreq=TRUE, m="M0")
closedp.bc(X,dfreq=TRUE, m="Mt")

Run the code above in your browser using DataLab