Learn R Programming

Rcapture (version 1.3-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=NULL, t0=t,
           m=c("M0","Mt","Mh","Mth","Mb","Mbh"), h=NULL, theta=NULL)

## 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
t
Requested only if dtype="nbcap". A numeric specifying the total number of capture occasions in the experiment.
t0
A numeric used only if m equals "M0" or m="Mh": 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", "LB", "Poisson", "Darroch" or "Gamma") or a numerical R function specifying the form of the column(s) for heterogeneity in the design matrix. "Chao" and "LB" represents Chao's lower boun
theta
The value of the parameter $theta$ in $f(k)=theta^k-1$ for the Poisson model (the default value is 2) and in $f(k)=-\log(theta + k) + \log(theta)$ for the Gamma model (the default value is 3.5).
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 the requested model, the corrected population size estimation and its standard error. If the name of the model is followed by ** in this table, it means that the model did not converge. Therefore, the corrected population size estimation for this model is questionable.
  • convergeOnly if the corrected population size estimation was obtained with glm.fit: A logical vector indicating whether or not the fitted model converged.
  • glm.warnOnly if the corrected population size estimation was obtained with glm.fit: A vector of character strings. If the glm.fit function generates one or more warnings when fitting the model, a copy of these warnings are stored in glm.warn. NULL if glm.fit did not produce any warnings.

Details

For the Mt model: When t=2, closedp.bc returns the Petersen estimator with Chapman's (1951) bias correction and the bias corrected standard error estimator of Seber (1970) and Wittes (1972). 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. Chapman, D. G. (1951) Some properties of the hypergeometric distribution with applications to zoological sample censuses. University of California Publications in Statistics, 1(7), 131-160. Rivest, L.P. and Levesque, T. (2001) Improved loglinear model estimators of abundance in capture-recapture experiments. Canadian Journal of Statistics, 29, 555-572. Seber, G.A.F. (1970) The effects of trap response on tag recapture estimates. Biometrics, 26, 13-22. Seber, G.A.F. (1982) The Estimation of Animal Abundance and Related Parameters, 2nd edition. New York: Macmillan. Wittes, J.T. (1972) On the bias and estimated variance of Chapman's two-sample capture-recapture population estimate. Biometrics, 28, 592-597.

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 are 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